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>
This commit is contained in:
Andrey Gusev 2018-01-05 14:38:11 +02:00 committed by Alexandre Julliard
parent 53b73055b7
commit 67e80856e6
2 changed files with 7 additions and 0 deletions

View File

@ -1033,7 +1033,10 @@ START_TEST (notification)
ret = WaitForSingleObject( si.event, 10000 ); ret = WaitForSingleObject( si.event, 10000 );
ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError()); ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError());
if (ret != WAIT_OBJECT_0) if (ret != WAIT_OBJECT_0)
{
CloseHandle(thread);
return; return;
}
test_persistent_connection( si.port ); test_persistent_connection( si.port );

View File

@ -4475,7 +4475,10 @@ START_TEST (winhttp)
ret = WaitForSingleObject(si.event, 10000); ret = WaitForSingleObject(si.event, 10000);
ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError()); ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError());
if (ret != WAIT_OBJECT_0) if (ret != WAIT_OBJECT_0)
{
CloseHandle(thread);
return; return;
}
test_IWinHttpRequest(si.port); test_IWinHttpRequest(si.port);
test_connection_info(si.port); test_connection_info(si.port);
@ -4495,4 +4498,5 @@ START_TEST (winhttp)
test_basic_request(si.port, NULL, quitW); test_basic_request(si.port, NULL, quitW);
WaitForSingleObject(thread, 3000); WaitForSingleObject(thread, 3000);
CloseHandle(thread);
} }