summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-18 22:33:49 -0400
committerRuss Cox <rsc@golang.org>2014-09-18 22:33:49 -0400
commitbfc6b63651f3bd8b36e7a98d794df89de4a65bee (patch)
tree0e0469ba1ed66cd58bce0ab385ca350551b7ade3
parent8bf57394a0727e681e19a71fa522cb45371a5703 (diff)
downloadgo-bfc6b63651f3bd8b36e7a98d794df89de4a65bee.tar.gz
runtime: release Windows thread handle in unminit
Fixes issue 8517. LGTM=dvyukov, alex.brainman R=golang-codereviews, dvyukov, alex.brainman CC=golang-codereviews https://codereview.appspot.com/145890044
-rw-r--r--src/runtime/os_windows.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/os_windows.c b/src/runtime/os_windows.c
index 6c8f137ee..62d94b65a 100644
--- a/src/runtime/os_windows.c
+++ b/src/runtime/os_windows.c
@@ -278,6 +278,8 @@ runtime·minit(void)
void
runtime·unminit(void)
{
+ runtime·stdcall1(runtime·CloseHandle, (uintptr)g->m->thread);
+ g->m->thread = nil;
}
// Described in http://www.dcl.hpi.uni-potsdam.de/research/WRK/2007/08/getting-os-information-the-kuser_shared_data-structure/