From: Dr. David von Oheimb Date: Tue, 12 May 2020 08:14:00 +0000 (+0200) Subject: Preliminary fix of memory leak in try_decode_PKCS12() - full fix is in #11733 X-Git-Tag: openssl-3.0.0-alpha2~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3c38fa4b797848a76b83f91e423de470adbb3b61;p=oweals%2Fopenssl.git Preliminary fix of memory leak in try_decode_PKCS12() - full fix is in #11733 Reviewed-by: Matt Caswell Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/11470) --- diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c index 9f6158ff79..320c527a65 100644 --- a/crypto/store/loader_file.c +++ b/crypto/store/loader_file.c @@ -278,6 +278,7 @@ static OSSL_STORE_INFO *try_decode_PKCS12(const char *pem_name, (void)sk_X509_shift(chain); } } + sk_X509_free(chain); if (!ok) { OSSL_STORE_INFO_free(osi_ca); OSSL_STORE_INFO_free(osi_cert);