diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-06-14 22:57:31 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-06-14 22:57:43 +0200 |
commit | ce03d26e033e6b54e50a2c16ebabaf8ff57e2794 (patch) | |
tree | 277e89fdd653113263a50fe94af5abf5c718901b | |
parent | db2d0ebc44530ee101a40c3babbaa37ca3a13f00 (diff) | |
download | libssh-ce03d26e033e6b54e50a2c16ebabaf8ff57e2794.tar.gz libssh-ce03d26e033e6b54e50a2c16ebabaf8ff57e2794.tar.xz libssh-ce03d26e033e6b54e50a2c16ebabaf8ff57e2794.zip |
Fix memory leak with session_id
-rw-r--r-- | src/wrapper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wrapper.c b/src/wrapper.c index c4ba7d5e..bbe26e66 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -115,6 +115,10 @@ void crypto_free(struct ssh_crypto_struct *crypto){ SAFE_FREE(crypto->ecdh_client_pubkey); SAFE_FREE(crypto->ecdh_server_pubkey); #endif + if(crypto->session_id != NULL){ + memset(crypto->session_id, '\0', crypto->digest_len); + SAFE_FREE(crypto->session_id); + } #ifdef WITH_LIBZ if (crypto->compress_out_ctx && |