Commit 36f7ed50 authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

cms_SignerInfo_content_sign: free sig on failure path



Signed-off-by: default avatarKurt Roeckx <kurt@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 4e64f671
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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