Juan Lang : winhttp/tests: Only free a certificate context if retrieving it succeeded.
Alexandre Julliard
julliard at winehq.org
Wed Dec 9 10:46:27 CST 2009
Module: wine
Branch: master
Commit: b0f5b96efe86a0728b4c69198b2b9404b4684e02
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0f5b96efe86a0728b4c69198b2b9404b4684e02
Author: Juan Lang <juan.lang at gmail.com>
Date: Tue Dec 8 13:43:49 2009 -0800
winhttp/tests: Only free a certificate context if retrieving it succeeded.
---
dlls/winhttp/tests/winhttp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 2810fbb..342dde2 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -787,7 +787,8 @@ 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);
+ if (ret)
+ CertFreeCertificateContext(cert);
size = sizeof(bitness);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_KEY_BITNESS, &bitness, &size );
More information about the wine-cvs
mailing list