[openssl-commits] [openssl] master update
Matt Caswell
matt at openssl.org
Mon Apr 18 14:02:35 UTC 2016
The branch master has been updated
via 36c6f0ad0f1464d47493309c24e2275af7f09c1e (commit)
from 14f051a0ae3d752c50f419d3583e85fdf4c5bfc9 (commit)
- Log -----------------------------------------------------------------
commit 36c6f0ad0f1464d47493309c24e2275af7f09c1e
Author: Matt Caswell <matt at openssl.org>
Date: Mon Apr 18 10:35:34 2016 +0100
Fix PKCS7 memory leak
Commit f0e0fd51f was a bit over-zealous in removing a call to
X509_STORE_CTX_cleanup(). The call in question was in a loop and was
required to cleanup resources used on each iteration of the loop. Removing
this resulted in a memory leak.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/pkcs7/pk7_smime.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/crypto/pkcs7/pk7_smime.c b/crypto/pkcs7/pk7_smime.c
index b146f68..7c2d5c9 100644
--- a/crypto/pkcs7/pk7_smime.c
+++ b/crypto/pkcs7/pk7_smime.c
@@ -328,6 +328,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
i = X509_verify_cert(cert_ctx);
if (i <= 0)
j = X509_STORE_CTX_get_error(cert_ctx);
+ X509_STORE_CTX_cleanup(cert_ctx);
if (i <= 0) {
PKCS7err(PKCS7_F_PKCS7_VERIFY,
PKCS7_R_CERTIFICATE_VERIFY_ERROR);
More information about the openssl-commits
mailing list