mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
sftpserver: Free memory on error condition
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
This commit is contained in:
@@ -1121,6 +1121,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