1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

Fix memory leak with session_id

This commit is contained in:
Aris Adamantiadis
2011-06-14 22:57:31 +02:00
parent db2d0ebc44
commit ce03d26e03

View File

@@ -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 &&