From 86a428a4a52172df5e49436212e9f769248e0b15 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 2 May 2018 10:03:58 -0400 Subject: [PATCH] windows threading: add missing call to CloseHandle --- std/os/index.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/std/os/index.zig b/std/os/index.zig index 4f1826021f..93c5f70f1e 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -2477,6 +2477,7 @@ pub const Thread = struct { }, builtin.Os.windows => { assert(windows.WaitForSingleObject(self.data.handle, windows.INFINITE) == windows.WAIT_OBJECT_0); + assert(windows.CloseHandle(self.data.handle) != 0); assert(windows.HeapFree(self.data.heap_handle, 0, self.data.alloc_start) != 0); }, else => @compileError("Unsupported OS"),