summaryrefslogtreecommitdiff
path: root/libfshelp/fetch-root.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-19 03:06:26 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-19 03:06:26 +0100
commit03f8e9b08a9d4f5034ea1a27c3a8e86d9b147306 (patch)
treef69bfe220581109b8611a60b0ddb83c20d2e7a19 /libfshelp/fetch-root.c
parentc595ceac1ad8c40aec85318e07424e5b6f338dad (diff)
Fix spurious port deallocation
* libfshelp/fetch-root.c (fshelp_fetch_root): When translator has died, do not deallocate its control port twice.
Diffstat (limited to 'libfshelp/fetch-root.c')
-rw-r--r--libfshelp/fetch-root.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index d7761e58..cc9fa502 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -189,7 +189,8 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
if ((err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
&& control == box->active)
fshelp_set_active (box, MACH_PORT_NULL, 0);
- mach_port_deallocate (mach_task_self (), control);
+ else
+ mach_port_deallocate (mach_task_self (), control);
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
goto start_over;