Module: wine Branch: master Commit: a15d4de557ac2ba3b2418cb39fc6080a7523e604 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a15d4de557ac2ba3b2418cb39...
Author: Gijs Vermeulen gijsvrm@gmail.com Date: Tue Jan 15 17:05:10 2019 +0100
crypt32/tests: Fix a memory leak (Valgrind).
Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/crypt32/tests/store.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 0adfeb8..d862902 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -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());