From: Jonas Maebe Date: Sun, 8 Dec 2013 16:16:57 +0000 (+0100) Subject: cms_SignerInfo_content_sign: free sig on failure path X-Git-Tag: master-post-reformat~504 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=36f7ed5040d27a5446d66649986cb3595161f685;p=oweals%2Fopenssl.git cms_SignerInfo_content_sign: free sig on failure path Signed-off-by: Kurt Roeckx Reviewed-by: Rich Salz --- 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