From 03f8e9b08a9d4f5034ea1a27c3a8e86d9b147306 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 19 Mar 2016 03:06:26 +0100 Subject: Fix spurious port deallocation * libfshelp/fetch-root.c (fshelp_fetch_root): When translator has died, do not deallocate its control port twice. --- libfshelp/fetch-root.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libfshelp/fetch-root.c') 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; -- cgit v1.2.3