Loading...
threads/mig_support.c Libc-583 Libc-320
--- Libc/Libc-583/threads/mig_support.c
+++ Libc/Libc-320/threads/mig_support.c
@@ -2,6 +2,8 @@
  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
+ * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
@@ -133,7 +135,7 @@
             if (port != MACH_PORT_NULL && port != _task_reply_port) {
                     LOCK(reply_port_lock);
                     pself->reply_port = _task_reply_port;
-                    (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
+                    (void) mach_port_destroy(mach_task_self(), port);
                     pself->reply_port = MACH_PORT_NULL;
                     UNLOCK(reply_port_lock);
             }
@@ -151,7 +153,7 @@
         if (port != MACH_PORT_NULL && port != _task_reply_port) {
 		LOCK(reply_port_lock);
                 self->reply_port = _task_reply_port;
-		(void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
+                (void) mach_port_destroy(mach_task_self(), port);
                 self->reply_port = MACH_PORT_NULL;
 		UNLOCK(reply_port_lock);
 	}