diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-12-22 22:16:18 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-12-22 22:16:18 +0100 |
commit | 908ba8441182f34a7b565a692ebb60e8af321d17 (patch) | |
tree | 2a7fc23a4dc8ffff4f71df975b379b6f999a13ca /proc | |
parent | 7d42ebb20eedf0e5dce457f8355a0e2d29ca5021 (diff) |
Fix duplicate port deallocation
* proc/notify.c (do_mach_notify_dead_name): Do not call
mach_port_deallocate on `deadport' on failure.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/notify.c | 5 |
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 |