From ce03d26e033e6b54e50a2c16ebabaf8ff57e2794 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 14 Jun 2011 22:57:31 +0200 Subject: Fix memory leak with session_id --- src/wrapper.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/wrapper.c b/src/wrapper.c index c4ba7d5..bbe26e6 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 && -- cgit