]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
cms: fix memleaks in cms_env.c
authorzhaozg <zhaozg@gmail.com>
Tue, 24 Aug 2021 14:43:18 +0000 (22:43 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 27 Aug 2021 07:24:35 +0000 (09:24 +0200)
CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16403)

crypto/cms/cms_env.c

index 04940146fd253c451a4a35963e9bdfa9bd8c46d0..fe078f1a7f455ad3e03d91253792c8aab8895168 100644 (file)
@@ -737,6 +737,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms,
         goto err;
     }
 
+    OPENSSL_clear_free(ec->key, ec->keylen);
     ec->key = ukey;
     ec->keylen = ukeylen;