summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorMansour Ahmadi <m.ahmadi@northeastern.edu>2018-12-11 16:18:21 -0500
committerMatt Caswell <matt@openssl.org>2018-12-13 10:10:02 +0000
commitfaafe140a856ecbe743a0533a2d7117ece040f29 (patch)
tree498093f5aa36f65a911aa7dc88edc7ec606c9199 /crypto/cms
parent3b16099e0c8df1fd5094ad4490d87ab31516bf25 (diff)
Add missing OPENSSL_clear_free before using ec->key
Fixes #7657 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7877) (cherry picked from commit 4128136a28c3b7d3878daed728c49f18eb950adc)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_pwri.c1
1 files changed, 1 insertions, 0 deletions
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;