From: Christian Heimes Date: Wed, 6 Nov 2013 16:25:17 +0000 (+0100) Subject: Issue #18582: fix memory leak in pbkdf2 code X-Git-Tag: v3.4.0b1~375 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6853108ccd09d2be6d1af828053db35577b30200;p=thirdparty%2FPython%2Fcpython.git Issue #18582: fix memory leak in pbkdf2 code --- diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 80e1b61ab518..1a11bb5b513e 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -535,6 +535,7 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen, HMAC_CTX_cleanup(&hctx); return 0; } + HMAC_CTX_cleanup(&hctx); memcpy(p, digtmp, cplen); for (j = 1; j < iter; j++) { if (!HMAC_CTX_copy(&hctx, &hctx_tpl)) {