1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

Fix leak when key exchange fails.

This commit is contained in:
Aris Adamantiadis
2011-01-09 22:27:55 +01:00
parent d1e1103198
commit ac6278feb7

View File

@@ -175,6 +175,10 @@ void ssh_free(ssh_session session) {
#endif
ssh_buffer_free(session->in_buffer);
ssh_buffer_free(session->out_buffer);
if(session->in_hashbuf != NULL)
ssh_buffer_free(session->in_hashbuf);
if(session->out_hashbuf != NULL)
ssh_buffer_free(session->out_hashbuf);
session->in_buffer=session->out_buffer=NULL;
crypto_free(session->current_crypto);
crypto_free(session->next_crypto);