--- pt-thread-alloc.c	2012-06-15 12:21:58.860684695 -0600
+++ pt-thread-alloc.c.new	2012-06-19 11:01:20.597119949 -0600
@@ -97,7 +97,11 @@
     {
       err = __thread_create (__mach_task_self (), &thread->kernel_thread);
       if (err)
-	return EAGAIN;
+	{
+	  __mach_port_destroy (__mach_task_self (),
+			       thread->wakeupmsg.msgh_remote_port);
+	  return EAGAIN;
+	}
     }
 
   thread->have_kernel_resources = 1;
