Commit ba9ccc51 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wintrust: Fix memory leaks in tests.

parent a191184a
......@@ -179,8 +179,12 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
ok(data.pasSigners[0].pasCertChain != NULL,
"Expected pasCertChain to be allocated\n");
if (data.pasSigners[0].pasCertChain)
{
ok(data.pasSigners[0].pasCertChain[0].pCert == cert,
"Unexpected cert\n");
CertFreeCertificateContext(
data.pasSigners[0].pasCertChain[0].pCert);
}
CertFreeCertificateContext(cert);
}
else
......@@ -433,6 +437,9 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
(CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST),
"Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08x\n",
data.pasSigners[0].pasCertChain[0].dwConfidence);
CertFreeCertificateContext(
data.pasSigners[0].pasCertChain[0].pCert);
CertFreeCertificateChain(data.pasSigners[0].pChainContext);
CertFreeCertificateContext(cert);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment