From 320407a174facdeb154a3a06a3d3baf652415ff0 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 19 Nov 2009 09:45:29 -0800 Subject: [PATCH] cryptnet: Fix memory leaks in tests. --- dlls/cryptnet/tests/cryptnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index 618e494a878..40f66f61dda 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -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); -- 2.11.4.GIT