From 2fb4e44466f31851094aad409eb74ebced6925f6 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 21 Jul 1995 21:37:01 +0000 Subject: (diskfs_S_io_restrict_auth): Free initial referenc created by diskfs_make_protid. --- libdiskfs/io-restrict-auth.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libdiskfs/io-restrict-auth.c') diff --git a/libdiskfs/io-restrict-auth.c b/libdiskfs/io-restrict-auth.c index 0cd15792..3565e4e2 100644 --- a/libdiskfs/io-restrict-auth.c +++ b/libdiskfs/io-restrict-auth.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994 Free Software Foundation + Copyright (C) 1994, 1995 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -41,6 +41,7 @@ diskfs_S_io_restrict_auth (struct protid *cred, { uid_t *newuids, *newgids; int i, newnuids, newngids; + struct protid *newpi; if (!cred) return EOPNOTSUPP; @@ -56,10 +57,10 @@ diskfs_S_io_restrict_auth (struct protid *cred, newgids[newngids++] = cred->gids[i]; mutex_lock (&cred->po->np->lock); - *newport = (ports_get_right - (diskfs_make_protid (cred->po, newuids, newnuids, newgids, - newngids))); + newpi = diskfs_make_protid (cred->po, newuids, newnuids, newgids, newngids); + *newport = ports_get_right (newpi); mutex_unlock (&cred->po->np->lock); *newportpoly = MACH_MSG_TYPE_MAKE_SEND; + ports_port_deref (newpi); return 0; } -- cgit v1.2.3