summaryrefslogtreecommitdiff
path: root/proc/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc/notify.c')
-rw-r--r--proc/notify.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc/notify.c b/proc/notify.c
index 07fc376d..5a112b07 100644
--- a/proc/notify.c
+++ b/proc/notify.c
@@ -41,12 +41,10 @@ do_mach_notify_dead_name (mach_port_t notify,
{
struct proc *p;
- /* Drop gratuitous extra reference that the notification creates. */
- mach_port_deallocate (mach_task_self (), deadport);
-
if (notify == generic_port)
{
check_dead_execdata_notify (deadport);
+ mach_port_deallocate (mach_task_self (), deadport);
return 0;
}
@@ -59,6 +57,7 @@ do_mach_notify_dead_name (mach_port_t notify,
{
process_has_exited (p);
ports_port_deref (p);
+ mach_port_deallocate (mach_task_self (), deadport);
return 0;
}
else