From 161c9b426222ceb9397257f017a5dfff840aa518 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 27 Feb 2012 16:46:34 +0000 Subject: [PATCH] PR: 2737 Submitted by: Remi Gacogne Fix double free in PKCS12_parse if we run out of memory. --- crypto/pkcs12/p12_kiss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1