summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-11-20 13:37:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 11:29:54 +0100
commit0da841bc337faa00d947cc2e3c273bf87e7cc700 (patch)
tree7cd812bf7c280b24a85d2a1a630245b052c5d23f /src/corelib/thread
parent58f0a9ba5a38295aed1cc278d87077d23e6bf19c (diff)
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 <andy.shaw@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_win.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}