cms_SignerInfo_content_sign: free sig on failure path
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
4e64f671c9
commit
36f7ed5040
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue