From 67e80856e65f2d52fca5ad3cd23ad0a92b8c0b5e Mon Sep 17 00:00:00 2001 From: Andrey Gusev Date: Fri, 5 Jan 2018 14:38:11 +0200 Subject: [PATCH] winhttp/tests: Fix resource leak. Signed-off-by: Andrey Gusev Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/winhttp/tests/notification.c | 3 +++ dlls/winhttp/tests/winhttp.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index da8f8e9bd91..2a647e3633f 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -1033,7 +1033,10 @@ START_TEST (notification) ret = WaitForSingleObject( si.event, 10000 ); ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError()); if (ret != WAIT_OBJECT_0) + { + CloseHandle(thread); return; + } test_persistent_connection( si.port ); diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index e06661c31e6..4399cf6df4a 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -4475,7 +4475,10 @@ START_TEST (winhttp) ret = WaitForSingleObject(si.event, 10000); ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError()); if (ret != WAIT_OBJECT_0) + { + CloseHandle(thread); return; + } test_IWinHttpRequest(si.port); test_connection_info(si.port); @@ -4495,4 +4498,5 @@ START_TEST (winhttp) test_basic_request(si.port, NULL, quitW); WaitForSingleObject(thread, 3000); + CloseHandle(thread); }