From: Richard Levitte Date: Tue, 3 Apr 2001 09:42:49 +0000 (+0000) Subject: Plug a memory leak. Spotted by "Shijin" X-Git-Tag: OpenSSL_0_9_6a~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=72cd659df695d9c3bd9548fe570d8d1b6bad641d;p=oweals%2Fopenssl.git Plug a memory leak. Spotted by "Shijin" --- diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index 1fbbd6c99f..5d67f19b45 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -264,6 +264,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, if (lkey) { *keymatch |= MATCH_CERT; if (cert) *cert = x509; + else X509_free(x509); } else { if(ca) sk_X509_push (*ca, x509); else X509_free(x509);