fix leak in Windows version of pthread_mutex_free

Free the lock pointer in addition to the critical section. Thanks to
martinkucera74 on github.
This commit is contained in:
Brent Cook 2021-02-28 10:04:51 -06:00
parent 81e17c7348
commit 90f1c4db5c

View File

@ -106,6 +106,7 @@ static inline int
pthread_mutex_destroy(pthread_mutex_t *mutex) pthread_mutex_destroy(pthread_mutex_t *mutex)
{ {
DeleteCriticalSection(mutex->lock); DeleteCriticalSection(mutex->lock);
free(mutex->lock);
return 0; return 0;
} }