1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

- Anonymous bug report #2795816 revealed that libssh2_sftp_shutdown() did not

properly free/cleanup the SFTP handle so libssh2 leaked memory and caused
   an assert() on subsequent libssh2_sftp_init() calls on the same session.
This commit is contained in:
Daniel Stenberg
2009-05-23 22:30:43 +02:00
parent ad13de92d4
commit f1f49c3cce
2 changed files with 17 additions and 1 deletions

View File

@@ -791,7 +791,10 @@ sftp_shutdown(LIBSSH2_SFTP *sftp)
LIBSSH2_FREE(session, sftp->symlink_packet);
sftp->symlink_packet = NULL;
}
if (session->sftpInit_sftp) {
LIBSSH2_FREE(session, session->sftpInit_sftp);
session->sftpInit_sftp = NULL;
}
rc = _libssh2_channel_free(sftp->channel);
return rc;