cryptnet: Fix memory leaks in tests.

This commit is contained in:
Juan Lang 2009-11-19 09:45:29 -08:00 committed by Alexandre Julliard
parent 8700253775
commit 320407a174
1 changed files with 3 additions and 0 deletions

View File

@ -376,10 +376,13 @@ static void test_retrieveObjectByUrl(void)
skip("no usable CertificateContext\n");
return;
}
CertFreeCertificateContext(cert);
aux.pLastSyncTime = &ft;
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
(void **)&cert, NULL, NULL, NULL, &aux);
ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError());
CertFreeCertificateContext(cert);
ok(ft.dwLowDateTime || ft.dwHighDateTime,
"Expected last sync time to be set\n");
DeleteFileA(tmpfile);