ntdll: Mac: Fix leak of send right for Mach thread port.
The leaked send right kept the port alive for threads that are gone. For processes which create a lot of threads, this can cause performance problems.
This commit is contained in:
parent
62019e6d3a
commit
07d005de84
|
@ -942,6 +942,7 @@ static int get_unix_tid(void)
|
|||
ret = pthread_self();
|
||||
#elif defined(__APPLE__)
|
||||
ret = mach_thread_self();
|
||||
mach_port_deallocate(mach_task_self(), ret);
|
||||
#elif defined(__FreeBSD__)
|
||||
long lwpid;
|
||||
thr_self( &lwpid );
|
||||
|
|
Loading…
Reference in New Issue