no longer register atexit call to free mutex in pthread_mutex_initializer - user code should do that.
brought to light by simon's network / thread util itself freeing the mutex, leading to invalid handle atexit. This was SVN commit r1009.
This commit is contained in:
parent
fdaa535fc2
commit
af85086e3b
@ -370,7 +370,7 @@ pthread_mutex_t pthread_mutex_initializer()
|
||||
HANDLE h = CreateMutex(0, 0, 0);
|
||||
if(h == INVALID_HANDLE_VALUE)
|
||||
return 0;
|
||||
atexit2(CloseHandle, (uintptr_t)h, CC_STDCALL_1);
|
||||
// app is responsible for freeing via pthread_destroy_mutex!
|
||||
return h;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user