1
1

Fix my recent session->sftpInit_sftp fix which wasn't correct. The memory area

does not need to be freed (it already gets freed) but clearing the pointer is
a good idea. And it should be done _after_ the channel_free() call.
Этот коммит содержится в:
Daniel Stenberg 2009-05-24 23:44:52 +02:00
родитель fdc043e7b1
Коммит c5f335ad4f

Просмотреть файл

@ -791,12 +791,14 @@ 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);
if (session->sftpInit_sftp)
/* the SFTP stuff is freed by the stored "destructor" as part of the
channel free magic */
session->sftpInit_sftp = NULL;
return rc;
}