cryptnet: Fix memory leaks in tests.
This commit is contained in:
parent
8700253775
commit
320407a174
@ -376,10 +376,13 @@ static void test_retrieveObjectByUrl(void)
|
|||||||
skip("no usable CertificateContext\n");
|
skip("no usable CertificateContext\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
CertFreeCertificateContext(cert);
|
||||||
|
|
||||||
aux.pLastSyncTime = &ft;
|
aux.pLastSyncTime = &ft;
|
||||||
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
||||||
(void **)&cert, NULL, NULL, NULL, &aux);
|
(void **)&cert, NULL, NULL, NULL, &aux);
|
||||||
|
ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError());
|
||||||
|
CertFreeCertificateContext(cert);
|
||||||
ok(ft.dwLowDateTime || ft.dwHighDateTime,
|
ok(ft.dwLowDateTime || ft.dwHighDateTime,
|
||||||
"Expected last sync time to be set\n");
|
"Expected last sync time to be set\n");
|
||||||
DeleteFileA(tmpfile);
|
DeleteFileA(tmpfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user