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:
Ken Thomases 2010-02-24 00:52:13 -06:00 committed by Alexandre Julliard
parent 62019e6d3a
commit 07d005de84

View file

@ -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 );