Module: wine Branch: master Commit: 67e80856e65f2d52fca5ad3cd23ad0a92b8c0b5e URL: https://source.winehq.org/git/wine.git/?a=commit;h=67e80856e65f2d52fca5ad3cd...
Author: Andrey Gusev andrey.goosev@gmail.com Date: Fri Jan 5 14:38:11 2018 +0200
winhttp/tests: Fix resource leak.
Signed-off-by: Andrey Gusev andrey.goosev@gmail.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 da8f8e9..2a647e3 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 e06661c..4399cf6 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); }