From 90f1c4db5c2d4bfd42882b89495409d3eb1e1ed1 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 28 Feb 2021 10:04:51 -0600 Subject: fix leak in Windows version of pthread_mutex_free Free the lock pointer in addition to the critical section. Thanks to martinkucera74 on github. --- include/compat/pthread.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/compat/pthread.h b/include/compat/pthread.h index 223ad83..1ab011c 100755 --- a/include/compat/pthread.h +++ b/include/compat/pthread.h @@ -106,6 +106,7 @@ static inline int pthread_mutex_destroy(pthread_mutex_t *mutex) { DeleteCriticalSection(mutex->lock); + free(mutex->lock); return 0; } -- cgit v1.2.3-55-g6feb