From 7a095aaba9cccb58ffe12391baa3c1f3c562d4d6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 18 Sep 2014 22:33:49 -0400 Subject: [PATCH] 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 --- src/runtime/os_windows.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/os_windows.c b/src/runtime/os_windows.c index 6c8f137ee5af83..62d94b65a02061 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/