summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-05-08 12:03:34 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-05-08 12:04:30 +0200
commitff88e4aa1d70f2ef218080daf01282f38243d914 (patch)
treefe0b2e126fb0803893b500a2764b17c21f5aec77 /libfshelp
parent93d2b3c4e8ccbb580a04f86eee6f66ea538afb28 (diff)
Revert "fshelp: Fix fetching control ports."
This reverts commit 7b9011628ec0dea3e01b19b75013ce5cf5b9c841. We do want to release dead names, and not report the KERN_INVALID_RIGHT error, just return that there is no translator any more. As suggested by Sergey Bugaev
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/fetch-control.c6
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;
}