From: Dr. Stephen Henson Date: Mon, 27 Feb 2012 16:46:45 +0000 (+0000) Subject: PR: 2737 X-Git-Tag: OpenSSL_1_0_1~22 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b527b6e8ff743702c7c503a1b79050127eb5fe7a;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;