X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcms%2Fcms_env.c;h=e8274beabfe3ab1b85ed78e5d6579246c1076428;hp=d146f845e9042ab1c1aea46e5143760069891192;hb=b548a1f11c06ccdfa4f52a539912d22d77ee309e;hpb=33fbca83dcd05b77f807fab205c4523b8cfe85b5;ds=sidebyside diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index d146f845e9..e8274beabf 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -404,8 +404,7 @@ static int cms_RecipientInfo_ktri_encrypt(CMS_ContentInfo *cms, EVP_PKEY_CTX_free(pctx); ktri->pctx = NULL; } - if (ek) - OPENSSL_free(ek); + OPENSSL_free(ek); return ret; } @@ -472,7 +471,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, err: EVP_PKEY_CTX_free(ktri->pctx); ktri->pctx = NULL; - if (!ret && ek) + if (!ret) OPENSSL_free(ek); return ret; @@ -712,7 +711,7 @@ static int cms_RecipientInfo_kekri_encrypt(CMS_ContentInfo *cms, err: - if (!r && wkey) + if (!r) OPENSSL_free(wkey); OPENSSL_cleanse(&actx, sizeof(actx)); @@ -785,7 +784,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, err: - if (!r && ukey) + if (!r) OPENSSL_free(ukey); OPENSSL_cleanse(&actx, sizeof(actx));