OpenSSL: Fix memory leak in HMAC_CTX compatibility wrapper function
Commit 5c9a33702f
('OpenSSL: Clean up
crypto_hash_*() to use a single implementation') added a wrapper
function to allow the new OpenSSL API to be used with older OpenSSL
versions. However, the HMAC_CTX_free() wrapper was incorrectly skipping
the call to HMAC_CTX_cleanup() which is still needed to free the
resources OpenSSL allocated internally.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
d9a0f69747
commit
03e3ddf84e
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ static HMAC_CTX * HMAC_CTX_new(void)
|
||||||
|
|
||||||
static void HMAC_CTX_free(HMAC_CTX *ctx)
|
static void HMAC_CTX_free(HMAC_CTX *ctx)
|
||||||
{
|
{
|
||||||
|
HMAC_CTX_cleanup(ctx);
|
||||||
bin_clear_free(ctx, sizeof(*ctx));
|
bin_clear_free(ctx, sizeof(*ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue