Loading...
--- Libc/Libc-320/threads/mig_support.c
+++ Libc/Libc-583/threads/mig_support.c
@@ -2,8 +2,6 @@
* 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
@@ -135,7 +133,7 @@
if (port != MACH_PORT_NULL && port != _task_reply_port) {
LOCK(reply_port_lock);
pself->reply_port = _task_reply_port;
- (void) mach_port_destroy(mach_task_self(), port);
+ (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
pself->reply_port = MACH_PORT_NULL;
UNLOCK(reply_port_lock);
}
@@ -153,7 +151,7 @@
if (port != MACH_PORT_NULL && port != _task_reply_port) {
LOCK(reply_port_lock);
self->reply_port = _task_reply_port;
- (void) mach_port_destroy(mach_task_self(), port);
+ (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
self->reply_port = MACH_PORT_NULL;
UNLOCK(reply_port_lock);
}