Sebastian Lackner : kernel32/tests: Fix leak of threadpool object.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 3 09:02:36 CDT 2015


Module: wine
Branch: master
Commit: d2a3c9c20ef25e399046ce21d3b9d75e97702905
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d2a3c9c20ef25e399046ce21d3b9d75e97702905

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Fri Jul  3 02:00:59 2015 +0200

kernel32/tests: Fix leak of threadpool object.

---

 dlls/kernel32/tests/thread.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 25801b2..35e978e 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -86,6 +86,7 @@ static BOOL   (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR);
 static BOOL   (WINAPI *pGetCurrentActCtx)(HANDLE *);
 static void   (WINAPI *pReleaseActCtx)(HANDLE);
 static PTP_POOL (WINAPI *pCreateThreadpool)(PVOID);
+static void (WINAPI *pCloseThreadpool)(PTP_POOL);
 static PTP_WORK (WINAPI *pCreateThreadpoolWork)(PTP_WORK_CALLBACK,PVOID,PTP_CALLBACK_ENVIRON);
 static void (WINAPI *pSubmitThreadpoolWork)(PTP_WORK);
 static void (WINAPI *pWaitForThreadpoolWorkCallbacks)(PTP_WORK,BOOL);
@@ -1641,6 +1642,7 @@ static void test_threadpool(void)
 
     pool = pCreateThreadpool(NULL);
     ok (pool != NULL, "CreateThreadpool failed\n");
+    pCloseThreadpool(pool);
 }
 
 static void test_reserved_tls(void)
@@ -1705,6 +1707,7 @@ static void init_funcs(void)
     X(ReleaseActCtx);
 
     X(CreateThreadpool);
+    X(CloseThreadpool);
     X(CreateThreadpoolWork);
     X(SubmitThreadpoolWork);
     X(WaitForThreadpoolWorkCallbacks);




More information about the wine-cvs mailing list