Issue #18582: fix memory leak in pbkdf2 code
This commit is contained in:
parent
95887b7e5b
commit
6853108ccd
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in New Issue