From 0da841bc337faa00d947cc2e3c273bf87e7cc700 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 20 Nov 2013 13:37:48 +0100 Subject: Windows: Close handle to thread checking for adopted threads. Task-number: QTBUG-34840 [ChangeLog][QtCore][QThread][Windows][QTBUG-34840] Fix handle leak. Change-Id: I537c1c81a43907f01a81be740746582266969c6f Reviewed-by: Andy Shaw Reviewed-by: Joerg Bornemann --- src/corelib/thread/qthread_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index d49a6a9a8e..9d90583a28 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -182,7 +182,7 @@ void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread) qt_adopted_thread_handles.prepend(qt_adopted_thread_wakeup); } - CreateThread(0, 0, qt_adopted_thread_watcher_function, 0, 0, &qt_adopted_thread_watcher_id); + CloseHandle(CreateThread(0, 0, qt_adopted_thread_watcher_function, 0, 0, &qt_adopted_thread_watcher_id)); } else { SetEvent(qt_adopted_thread_wakeup); } -- cgit v1.2.3