aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--startup/startup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/startup/startup.c b/startup/startup.c
index 90cdaa85..bc0ff73a 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -1465,10 +1465,6 @@ S_startup_essential_task (mach_port_t server,
static int authinit, procinit, execinit, fsinit;
int fail;
- /* Always deallocate the extra reference this message carries. */
- if (MACH_PORT_VALID (credential))
- mach_port_deallocate (mach_task_self (), credential);
-
if (credential != host_priv)
return EPERM;
@@ -1480,6 +1476,10 @@ S_startup_essential_task (mach_port_t server,
if (fail)
return fail;
+ /* Always deallocate the extra reference this message carries. */
+ if (MACH_PORT_VALID (credential))
+ mach_port_deallocate (mach_task_self (), credential);
+
if (!booted)
{
if (!strcmp (name, "auth"))