mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
sftpserver: Free memory on error condition
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
(cherry picked from commit 69c169e4cb)
This commit is contained in:
@@ -1112,6 +1112,7 @@ process_opendir(sftp_client_message client_msg)
|
|||||||
sftp_reply_handle(client_msg, handle_s);
|
sftp_reply_handle(client_msg, handle_s);
|
||||||
ssh_string_free(handle_s);
|
ssh_string_free(handle_s);
|
||||||
} else {
|
} else {
|
||||||
|
free(h);
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
sftp_reply_status(client_msg, SSH_FX_FAILURE, "No handle available");
|
sftp_reply_status(client_msg, SSH_FX_FAILURE, "No handle available");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user