wintrust: Fix memory leaks in tests.
This commit is contained in:
parent
a191184ae9
commit
ba9ccc51e2
|
@ -179,8 +179,12 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
|
||||||
ok(data.pasSigners[0].pasCertChain != NULL,
|
ok(data.pasSigners[0].pasCertChain != NULL,
|
||||||
"Expected pasCertChain to be allocated\n");
|
"Expected pasCertChain to be allocated\n");
|
||||||
if (data.pasSigners[0].pasCertChain)
|
if (data.pasSigners[0].pasCertChain)
|
||||||
|
{
|
||||||
ok(data.pasSigners[0].pasCertChain[0].pCert == cert,
|
ok(data.pasSigners[0].pasCertChain[0].pCert == cert,
|
||||||
"Unexpected cert\n");
|
"Unexpected cert\n");
|
||||||
|
CertFreeCertificateContext(
|
||||||
|
data.pasSigners[0].pasCertChain[0].pCert);
|
||||||
|
}
|
||||||
CertFreeCertificateContext(cert);
|
CertFreeCertificateContext(cert);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -433,6 +437,9 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
|
||||||
(CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST),
|
(CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST),
|
||||||
"Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08x\n",
|
"Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08x\n",
|
||||||
data.pasSigners[0].pasCertChain[0].dwConfidence);
|
data.pasSigners[0].pasCertChain[0].dwConfidence);
|
||||||
|
CertFreeCertificateContext(
|
||||||
|
data.pasSigners[0].pasCertChain[0].pCert);
|
||||||
|
CertFreeCertificateChain(data.pasSigners[0].pChainContext);
|
||||||
CertFreeCertificateContext(cert);
|
CertFreeCertificateContext(cert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue