mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
sftp: Set error if invalid session pointer is passed to sftp_new()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -100,9 +100,10 @@ static void sftp_ext_free(sftp_ext ext) {
|
||||
|
||||
sftp_session sftp_new(ssh_session session)
|
||||
{
|
||||
sftp_session sftp;
|
||||
sftp_session sftp = NULL;
|
||||
|
||||
if (session == NULL) {
|
||||
ssh_set_error_invalid(session);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user