summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proc/host.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proc/host.c b/proc/host.c
index 0bf292e2..2b3c4f3c 100644
--- a/proc/host.c
+++ b/proc/host.c
@@ -474,6 +474,7 @@ S_proc_register_version (pstruct_t server,
rebuild_uname ();
out:
- mach_port_deallocate (mach_task_self (), credential);
+ if (!err)
+ mach_port_deallocate (mach_task_self (), credential);
return err;
}