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"),