mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Plug a memory leak. Spotted by "Shijin" <shijin@comex.com>
This commit is contained in:
parent
61e2c34a10
commit
4e2a08ddd4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user