]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: release Windows thread handle in unminit
authorRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 02:33:49 +0000 (22:33 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 02:33:49 +0000 (22:33 -0400)
Fixes #8517.

LGTM=dvyukov, alex.brainman
R=golang-codereviews, dvyukov, alex.brainman
CC=golang-codereviews
https://golang.org/cl/145890044

src/runtime/os_windows.c

index 6c8f137ee5af83da8cf92756eb923599b2ecba88..62d94b65a02061f333531cc6cef2e622498aa34a 100644 (file)
@@ -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/