diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:37:01 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:37:01 +0000 |
commit | 2fb4e44466f31851094aad409eb74ebced6925f6 (patch) | |
tree | 99c8dbdd839408829ad46842b5180aef8ae0bd1d /libdiskfs | |
parent | 0f09e0dbce3947d90f44b3c9fff0ef4efa8b235a (diff) |
(diskfs_S_io_restrict_auth): Free initial referenc created by
diskfs_make_protid.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/io-restrict-auth.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |