From: Mansour Ahmadi Date: Tue, 11 Dec 2018 21:18:21 +0000 (-0500) Subject: Add missing OPENSSL_clear_free before using ec->key X-Git-Tag: OpenSSL_1_1_1b~116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=faafe140a856ecbe743a0533a2d7117ece040f29;p=oweals%2Fopenssl.git Add missing OPENSSL_clear_free before using ec->key Fixes #7657 Reviewed-by: Nicola Tuveri Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/7877) (cherry picked from commit 4128136a28c3b7d3878daed728c49f18eb950adc) --- diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c index eac9c2fc86..26e3bdcf9e 100644 --- a/crypto/cms/cms_pwri.c +++ b/crypto/cms/cms_pwri.c @@ -373,6 +373,7 @@ int cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, goto err; } + OPENSSL_clear_free(ec->key, ec->keylen); ec->key = key; ec->keylen = keylen;