From: Russ Cox Date: Fri, 19 Sep 2014 02:33:49 +0000 (-0400) Subject: runtime: release Windows thread handle in unminit X-Git-Tag: go1.4beta1~343 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=88d53ddb17d985693b2b5f065286d2647e4cb72d;p=gostls13.git runtime: release Windows thread handle in unminit Fixes #8517. LGTM=dvyukov, alex.brainman R=golang-codereviews, dvyukov, alex.brainman CC=golang-codereviews https://golang.org/cl/145890044 --- diff --git a/src/runtime/os_windows.c b/src/runtime/os_windows.c index 6c8f137ee5..62d94b65a0 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/