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:
@@ -115,6 +115,10 @@ void crypto_free(struct ssh_crypto_struct *crypto){
|
|||||||
SAFE_FREE(crypto->ecdh_client_pubkey);
|
SAFE_FREE(crypto->ecdh_client_pubkey);
|
||||||
SAFE_FREE(crypto->ecdh_server_pubkey);
|
SAFE_FREE(crypto->ecdh_server_pubkey);
|
||||||
#endif
|
#endif
|
||||||
|
if(crypto->session_id != NULL){
|
||||||
|
memset(crypto->session_id, '\0', crypto->digest_len);
|
||||||
|
SAFE_FREE(crypto->session_id);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_LIBZ
|
#ifdef WITH_LIBZ
|
||||||
if (crypto->compress_out_ctx &&
|
if (crypto->compress_out_ctx &&
|
||||||
|
|||||||
Reference in New Issue
Block a user