crypt32/tests: Fix a memory leak (Valgrind).

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Gijs Vermeulen 2019-01-15 17:05:10 +01:00 committed by Alexandre Julliard
parent be0d31c96d
commit a15d4de557
1 changed files with 3 additions and 0 deletions

View File

@ -2834,6 +2834,8 @@ static void testEmptyStore(void)
ok(res, "CertDeleteCertificateContextFromStore failed\n");
ok(cert3->hCertStore == cert->hCertStore, "Unexpected hCertStore\n");
CertFreeCertificateContext(cert3);
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL);
ok(store != NULL, "CertOpenStore failed\n");
@ -2847,6 +2849,7 @@ static void testEmptyStore(void)
ok(cert3->hCertStore == store, "Unexpected hCertStore\n");
CertCloseStore(store, 0);
CertFreeCertificateContext(cert3);
res = CertCloseStore(cert->hCertStore, CERT_CLOSE_STORE_CHECK_FLAG);
ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError());