From d9db5347164bd71f5966ae4b88047d50376b0b12 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 21 Dec 2009 00:42:19 +0100 Subject: Fix spurious newport deallocation * auth/auth.c (S_auth_server_authenticate): On MIG stub failure, deallocate the reply port by hand instead of letting the main message loop do it, since the latter would deallocate newport too, which we passed to the user. --- auth/auth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'auth/auth.c') diff --git a/auth/auth.c b/auth/auth.c index 239b4fb3..2afeaf7a 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -436,10 +436,9 @@ S_auth_server_authenticate (struct authhandle *serverauth, user->egids.ids, user->egids.num, user->agids.ids, user->agids.num); - ports_port_deref (user); if (err) - return err; - + mach_port_deallocate (mach_task_self (), reply); + ports_port_deref (user); mach_port_deallocate (mach_task_self (), rendezvous); return MIG_NO_REPLY; } -- cgit v1.2.3