mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed memory leak recently introduced with openssl-1.1.0 changes
This commit is contained in:
parent
f76454d7f7
commit
d5f2ae83e5
@ -545,6 +545,8 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
|
||||
HMAC_Update(&hmac_ctx,aad,aad_size) ;
|
||||
HMAC_Update(&hmac_ctx,data,data_size) ;
|
||||
HMAC_Final(&hmac_ctx,computed_tag,&md_size) ;
|
||||
|
||||
HMAC_CTX_cleanup(&hmac_ctx) ;
|
||||
#else
|
||||
HMAC_CTX *hmac_ctx = HMAC_CTX_new();
|
||||
|
||||
@ -576,6 +578,8 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
|
||||
HMAC_Update(&hmac_ctx,aad,aad_size) ;
|
||||
HMAC_Update(&hmac_ctx,data,data_size) ;
|
||||
HMAC_Final(&hmac_ctx,computed_tag,&md_size) ;
|
||||
|
||||
HMAC_CTX_cleanup(&hmac_ctx) ;
|
||||
#else
|
||||
HMAC_CTX *hmac_ctx = HMAC_CTX_new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user