Commit 617320dd authored by Christian Heimes's avatar Christian Heimes

Issue #18582: fix memory leak in pbkdf2 code

parent 801a1edc
...@@ -535,6 +535,7 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen, ...@@ -535,6 +535,7 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen,
HMAC_CTX_cleanup(&hctx); HMAC_CTX_cleanup(&hctx);
return 0; return 0;
} }
HMAC_CTX_cleanup(&hctx);
memcpy(p, digtmp, cplen); memcpy(p, digtmp, cplen);
for (j = 1; j < iter; j++) { for (j = 1; j < iter; j++) {
if (!HMAC_CTX_copy(&hctx, &hctx_tpl)) { if (!HMAC_CTX_copy(&hctx, &hctx_tpl)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment