From 5de5cbd1a1852aca1169deaa622dc900fdf064bc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 28 Dec 2009 03:10:47 +0100 Subject: Fix duplicate port deallocation on error * proc/info.c (S_proc_register_version): Do not deallocate port `credential' when err != 0. --- proc/host.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'proc/host.c') 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; } -- cgit v1.2.3