Juan Lang : wintrust: Fix memory leaks in tests.
Alexandre Julliard
julliard at winehq.org
Fri Dec 4 09:11:27 CST 2009
Module: wine
Branch: master
Commit: ba9ccc51e252ac9f38cb4c145b5619ac5508b6fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba9ccc51e252ac9f38cb4c145b5619ac5508b6fb
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Dec 3 15:12:57 2009 -0800
wintrust: Fix memory leaks in tests.
---
dlls/wintrust/tests/softpub.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c
index c60ccb3..e01a26c 100644
--- a/dlls/wintrust/tests/softpub.c
+++ b/dlls/wintrust/tests/softpub.c
@@ -179,8 +179,12 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
ok(data.pasSigners[0].pasCertChain != NULL,
"Expected pasCertChain to be allocated\n");
if (data.pasSigners[0].pasCertChain)
+ {
ok(data.pasSigners[0].pasCertChain[0].pCert == cert,
"Unexpected cert\n");
+ CertFreeCertificateContext(
+ data.pasSigners[0].pasCertChain[0].pCert);
+ }
CertFreeCertificateContext(cert);
}
else
@@ -433,6 +437,9 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
(CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST),
"Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08x\n",
data.pasSigners[0].pasCertChain[0].dwConfidence);
+ CertFreeCertificateContext(
+ data.pasSigners[0].pasCertChain[0].pCert);
+ CertFreeCertificateChain(data.pasSigners[0].pChainContext);
CertFreeCertificateContext(cert);
}
}
More information about the wine-cvs
mailing list