diff options
-rw-r--r-- | libfshelp/fetch-control.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libfshelp/fetch-control.c b/libfshelp/fetch-control.c index 3b05e11f..0a11197a 100644 --- a/libfshelp/fetch-control.c +++ b/libfshelp/fetch-control.c @@ -32,7 +32,11 @@ fshelp_fetch_control (struct transbox *box, MACH_PORT_RIGHT_SEND, 1); if (err == KERN_INVALID_RIGHT) - *control = box->active = MACH_PORT_NULL; + { + err = mach_port_deallocate (mach_task_self (), *control); + assert_perror_backtrace (err); + *control = box->active = MACH_PORT_NULL; + } return err; } |