From 1c181336039ada9e41814e0feb16963a95d1b7c6 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 22 Apr 2018 19:30:24 +0200 Subject: [PATCH] Close the handle of the thread in case of joining thread. --- m-mutex.h | 1 + 1 file changed, 1 insertion(+) diff --git a/m-mutex.h b/m-mutex.h index dd619662..f39e1388 100644 --- a/m-mutex.h +++ b/m-mutex.h @@ -204,6 +204,7 @@ static inline void m_thread_join(m_thread_t t) { DWORD dwWaitResult = WaitForSingleObject(*t, INFINITE); assert (dwWaitResult == WAIT_OBJECT_0); + CloseHandle(*t); }