mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
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
@ -680,7 +680,10 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (EVP_PKEY_sign(pctx, sig, &siglen, md, mdlen) <= 0)
|
if (EVP_PKEY_sign(pctx, sig, &siglen, md, mdlen) <= 0)
|
||||||
|
{
|
||||||
|
OPENSSL_free(sig);
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
ASN1_STRING_set0(si->signature, sig, siglen);
|
ASN1_STRING_set0(si->signature, sig, siglen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user