Skip to content

Commit

Permalink
runtime: release Windows thread handle in unminit
Browse files Browse the repository at this point in the history
Fixes #8517.

LGTM=dvyukov, alex.brainman
R=golang-codereviews, dvyukov, alex.brainman
CC=golang-codereviews
https://golang.org/cl/145890044
  • Loading branch information
rsc committed Sep 19, 2014
1 parent 66795e8 commit 88d53dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/os_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 88d53dd

Please sign in to comment.