summaryrefslogtreecommitdiff
path: root/libports/complete-deallocate.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-07-21 21:53:35 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-07-21 21:53:35 +0000
commitd76e25773dd5607845469c34b6df0b2619541613 (patch)
treed8ce6daacc5033f04a18a42d791c1add1023eb37 /libports/complete-deallocate.c
parent9b7b5a29f5a8a10f96ce1d2737e1c86f1254b4f3 (diff)
(_ports_complete_deallocate): Clear PI->port_right; and do it before
releasing _ports_lock.
Diffstat (limited to 'libports/complete-deallocate.c')
-rw-r--r--libports/complete-deallocate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libports/complete-deallocate.c b/libports/complete-deallocate.c
index c663cdfe..a0e4e7e0 100644
--- a/libports/complete-deallocate.c
+++ b/libports/complete-deallocate.c
@@ -35,11 +35,12 @@ _ports_complete_deallocate (struct port_info *pi)
pi->bucket->count--;
pi->class->count--;
- mutex_unlock (&_ports_lock);
mach_port_mod_refs (mach_task_self (), pi->port_right,
MACH_PORT_RIGHT_RECEIVE, -1);
-
+ pi->port_right = MACH_PORT_NULL;
+ mutex_unlock (&_ports_lock);
+
if (pi->class->clean_routine)
(*pi->class->clean_routine)(pi);