Andrey Gusev : webservices/tests: Fix resource leak.
Alexandre Julliard
julliard at winehq.org
Thu Jan 4 17:03:21 CST 2018
Module: wine
Branch: master
Commit: 5485189eb0d23167de3251fd4b84de70458a9815
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5485189eb0d23167de3251fd4b84de70458a9815
Author: Andrey Gusev <andrey.goosev at gmail.com>
Date: Thu Jan 4 19:10:45 2018 +0200
webservices/tests: Fix resource leak.
Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/webservices/tests/channel.c | 4 ++++
dlls/webservices/tests/proxy.c | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/tests/channel.c b/dlls/webservices/tests/channel.c
index 32820fe..17a0b58 100644
--- a/dlls/webservices/tests/channel.c
+++ b/dlls/webservices/tests/channel.c
@@ -976,6 +976,7 @@ START_TEST(channel)
thread = start_listener( &info );
test_message_read_write( &info );
WaitForSingleObject( thread, 3000 );
+ CloseHandle(thread);
info.type = WS_CHANNEL_TYPE_DUPLEX_SESSION;
info.binding = WS_TCP_CHANNEL_BINDING;
@@ -984,6 +985,7 @@ START_TEST(channel)
thread = start_listener( &info );
test_duplex_session( &info );
WaitForSingleObject( thread, 3000 );
+ CloseHandle(thread);
info.type = WS_CHANNEL_TYPE_DUPLEX;
info.binding = WS_UDP_CHANNEL_BINDING;
@@ -992,6 +994,7 @@ START_TEST(channel)
thread = start_listener( &info );
test_WsAcceptChannel( &info );
WaitForSingleObject( thread, 3000 );
+ CloseHandle(thread);
info.type = WS_CHANNEL_TYPE_DUPLEX_SESSION;
info.binding = WS_TCP_CHANNEL_BINDING;
@@ -999,6 +1002,7 @@ START_TEST(channel)
thread = start_listener( &info );
test_WsAcceptChannel( &info );
WaitForSingleObject( thread, 3000 );
+ CloseHandle(thread);
if (firewall_enabled) set_firewall( APP_REMOVE );
}
diff --git a/dlls/webservices/tests/proxy.c b/dlls/webservices/tests/proxy.c
index bc7ef81..95f980a 100644
--- a/dlls/webservices/tests/proxy.c
+++ b/dlls/webservices/tests/proxy.c
@@ -732,7 +732,11 @@ START_TEST(proxy)
ret = WaitForSingleObject( info.event, 3000 );
ok(ret == WAIT_OBJECT_0, "failed to start test server %u\n", GetLastError());
- if (ret != WAIT_OBJECT_0) return;
+ if (ret != WAIT_OBJECT_0)
+ {
+ CloseHandle(thread);
+ return;
+ }
test_WsSendMessage( info.port, &test1 );
test_WsReceiveMessage( info.port );
@@ -741,4 +745,5 @@ START_TEST(proxy)
test_WsSendMessage( info.port, &quit );
WaitForSingleObject( thread, 3000 );
+ CloseHandle(thread);
}
More information about the wine-cvs
mailing list