summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorzhaozg <zhaozg@gmail.com>2021-08-24 22:43:18 +0800
committerTomas Mraz <tomas@openssl.org>2021-08-27 09:26:12 +0200
commit5327da81f0c70e35bdd8860af9af351313ca4ae2 (patch)
treeec61c9c9da2bb2f3fc366f468f0265cf6f278748 /crypto/cms
parent597d24e2ab395991cb2048529714ea534c173591 (diff)
cms: fix memleaks in cms_env.c
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) (cherry picked from commit 58e1e397c6774be11b903c0f88e85bd2b8c4206f)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_env.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c
index 673880f6d9..51a1d7df84 100644
--- a/crypto/cms/cms_env.c
+++ b/crypto/cms/cms_env.c
@@ -951,6 +951,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms,
}
ukeylen += outlen;
+ OPENSSL_clear_free(ec->key, ec->keylen);
ec->key = ukey;
ec->keylen = ukeylen;