Submitted by: Remi Gacogne <rgacogne-bugs@coredump.fr>

Fix double free in PKCS12_parse if we run out of memory.
This commit is contained in:
Dr. Stephen Henson 2012-02-27 16:46:34 +00:00
parent 57cb030cea
commit 161c9b4262

View file

@ -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;