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:
parent
81e17c7348
commit
90f1c4db5c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user