diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 17:16:57 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-08-15 22:38:19 +0200 |
commit | 36f7ed5040d27a5446d66649986cb3595161f685 (patch) | |
tree | 0b1ff3af88498fe6a43047269293283b5edcc5e3 /crypto/cms | |
parent | rtcp_new: return failure if allocation of bi->ptr failed (diff) | |
download | openssl-36f7ed5040d27a5446d66649986cb3595161f685.tar.xz openssl-36f7ed5040d27a5446d66649986cb3595161f685.zip |
cms_SignerInfo_content_sign: free sig on failure path
Signed-off-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_sd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index ac5103abf7..681ee7e348 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -680,7 +680,10 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms, goto err; } if (EVP_PKEY_sign(pctx, sig, &siglen, md, mdlen) <= 0) + { + OPENSSL_free(sig); goto err; + } ASN1_STRING_set0(si->signature, sig, siglen); } else |