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 4128136a28)
This commit is contained in:
Mansour Ahmadi 2018-12-11 16:18:21 -05:00 committed by Matt Caswell
parent 3b16099e0c
commit faafe140a8
1 changed files with 1 additions and 0 deletions

View File

@ -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;