Hans Leidekker : winhttp/tests: Free the certificate context after use.

Alexandre Julliard julliard at winehq.org
Wed Oct 21 13:14:10 CDT 2009


Module: wine
Branch: master
Commit: 45b6cf835513930cc60278b6c7236092d7774caa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45b6cf835513930cc60278b6c7236092d7774caa

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Oct 21 13:19:15 2009 +0200

winhttp/tests: Free the certificate context after use.

Found by valgrind.

---

 dlls/winhttp/tests/Makefile.in |    2 +-
 dlls/winhttp/tests/winhttp.c   |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in
index 670ee1a..72d3435 100644
--- a/dlls/winhttp/tests/Makefile.in
+++ b/dlls/winhttp/tests/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 TESTDLL   = winhttp.dll
-IMPORTS   = winhttp advapi32 kernel32
+IMPORTS   = winhttp crypt32 advapi32 kernel32
 
 CTESTS = \
 	notification.c \
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index fc0d8ff..24bdbb8 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -763,6 +763,7 @@ static void test_secure_connection(void)
     size = sizeof(cert);
     ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size );
     ok(ret, "failed to retrieve certificate context %u\n", GetLastError());
+    CertFreeCertificateContext(cert);
 
     size = sizeof(bitness);
     ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_KEY_BITNESS, &bitness, &size );




More information about the wine-cvs mailing list