Index: base/threading/platform_thread_win.cc |
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc |
index e9752ba21394c671d1d84214e4cd65078bd940f3..daa6dc7c99f2e11cfa8b713b79a8214999eee635 100644 |
--- a/base/threading/platform_thread_win.cc |
+++ b/base/threading/platform_thread_win.cc |
@@ -76,6 +76,19 @@ DWORD __stdcall ThreadFunc(void* params) { |
ThreadIdNameManager::GetInstance()->RemoveName( |
platform_handle, |
PlatformThread::CurrentId()); |
+ |
+ /* Close the duplicated handle created for the thread name mapping. */ |
+ DuplicateHandle( |
+ GetCurrentProcess(), |
+ platform_handle, |
+ GetCurrentProcess(), |
+ NULL, |
zhaoqin
2013/11/26 20:35:56
This NULL will cause a handle leak.
It seems that
dsinclair
2013/11/28 15:51:14
Done.
|
+ 0, |
+ FALSE, |
+ DUPLICATE_CLOSE_SOURCE); |
+ |
+ CloseHandle(platform_handle); |
zhaoqin
2013/11/26 20:35:56
If you use DUPLICATE_CLOSE_SOURCE above in Duplica
dsinclair
2013/11/28 15:51:14
Done.
|
+ |
return NULL; |
} |