summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorBen Laurie <ben@links.org>2014-07-10 17:47:48 +0100
committerBen Laurie <ben@links.org>2014-07-10 17:49:02 +0100
commitc1d1b0114e9d370c30649e46182393dbfc00e20c (patch)
treee4971aaa721df7e4a6dd60efc75e9b83e1259735 /crypto/cms
parent66816c53bea0ecddb9448da7ea9a51a334496127 (diff)
Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_pwri.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c
index 8a574616d2..28f8f261a6 100644
--- a/crypto/cms/cms_pwri.c
+++ b/crypto/cms/cms_pwri.c
@@ -93,9 +93,10 @@ CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
X509_ALGOR *encalg = NULL;
unsigned char iv[EVP_MAX_IV_LENGTH];
int ivlen;
+
env = cms_get0_enveloped(cms);
if (!env)
- goto err;
+ return NULL;
if (wrap_nid <= 0)
wrap_nid = NID_id_alg_PWRI_KEK;