]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18582: fix memory leak in pbkdf2 code
authorChristian Heimes <christian@cheimes.de>
Wed, 6 Nov 2013 16:25:17 +0000 (17:25 +0100)
committerChristian Heimes <christian@cheimes.de>
Wed, 6 Nov 2013 16:25:17 +0000 (17:25 +0100)
Modules/_hashopenssl.c

index 80e1b61ab5182bb2f3cc6cc3c38cdfbdbc131d3b..1a11bb5b513ebbd9c5461e1f9ee5c6a5c1c37d9c 100644 (file)
@@ -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)) {