summaryrefslogtreecommitdiff
path: root/sysdeps/mach/pt-thread-alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/pt-thread-alloc.c')
-rw-r--r--sysdeps/mach/pt-thread-alloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/mach/pt-thread-alloc.c b/sysdeps/mach/pt-thread-alloc.c
index af92953..a191c71 100644
--- a/sysdeps/mach/pt-thread-alloc.c
+++ b/sysdeps/mach/pt-thread-alloc.c
@@ -86,6 +86,8 @@ __pthread_thread_alloc (struct __pthread *thread)
{
assert (__pthread_total == 0);
thread->kernel_thread = __mach_thread_self ();
+ /* We implicitly hold a reference. */
+ __mach_port_deallocate (__mach_task_self (), thread->kernel_thread);
}
else
{