Ken Thomases : ntdll: Mac: Fix leak of send right for Mach thread port.
Alexandre Julliard
julliard at winehq.org
Wed Feb 24 10:21:32 CST 2010
Module: wine
Branch: master
Commit: 07d005de84705eabdd134c94b9864c2a4bec6da8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=07d005de84705eabdd134c94b9864c2a4bec6da8
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Feb 24 00:52:13 2010 -0600
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.
---
dlls/ntdll/server.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 1eea402..568f0c5 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -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 );
More information about the wine-cvs
mailing list