From: Dr. Stephen Henson Date: Mon, 27 Feb 2012 16:46:34 +0000 (+0000) Subject: PR: 2737 X-Git-Tag: master-post-reformat~1927 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=161c9b426222ceb9397257f017a5dfff840aa518;p=oweals%2Fopenssl.git PR: 2737 Submitted by: Remi Gacogne Fix double free in PKCS12_parse if we run out of memory. --- diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index 292cc3ed4a..206b1b0b18 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -167,7 +167,7 @@ int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, if (cert && *cert) X509_free(*cert); if (x) - X509_free(*cert); + X509_free(x); if (ocerts) sk_X509_pop_free(ocerts, X509_free); return 0;