wintrust: Fix memory leaks in tests.

This commit is contained in:
Juan Lang 2009-12-03 15:12:57 -08:00 committed by Alexandre Julliard
parent a191184ae9
commit ba9ccc51e2
1 changed files with 7 additions and 0 deletions

View File

@ -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);
}
}