aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/nullauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'libshouldbeinlibc/nullauth.c')
-rw-r--r--libshouldbeinlibc/nullauth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libshouldbeinlibc/nullauth.c b/libshouldbeinlibc/nullauth.c
index 3a98e558..8a19b05c 100644
--- a/libshouldbeinlibc/nullauth.c
+++ b/libshouldbeinlibc/nullauth.c
@@ -29,14 +29,16 @@ setnullauth (void)
{
error_t err;
+ auth_t ourauth = getauth ();
auth_t nullauth;
- err = auth_makeauth (getauth (),
+ err = auth_makeauth (ourauth,
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0,
NULL, 0,
NULL, 0,
NULL, 0,
&nullauth);
+ mach_port_deallocate (mach_task_self (), ourauth);
if (err)
return err;