From 50d29b8c6df6ab62be6a029175b6fa0f251ed305 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 28 Mar 2001 18:06:38 +0000 Subject: 2001-03-28 Marcus Brinkmann * dir-lookup.c (diskfs_S_dir_lookup): New variable USER. Store new iouser in that variable and free it after creating the protid for DIRPORT. * trans-callback.c (_diskfs_translator_callback2_fn): Likewise. * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise. * io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise. --- libdiskfs/io-restrict-auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libdiskfs/io-restrict-auth.c') diff --git a/libdiskfs/io-restrict-auth.c b/libdiskfs/io-restrict-auth.c index 0a3a5021..691a59ed 100644 --- a/libdiskfs/io-restrict-auth.c +++ b/libdiskfs/io-restrict-auth.c @@ -41,6 +41,7 @@ diskfs_S_io_restrict_auth (struct protid *cred, { error_t err; struct idvec *uvec, *gvec; + struct iouser *user; struct protid *newpi; int i; @@ -66,10 +67,10 @@ diskfs_S_io_restrict_auth (struct protid *cred, if (listmember (gids, cred->user->gids->ids[i], ngids)) idvec_add (gvec, cred->user->gids->ids[i]); } + user = iohelp_create_iouser (uvec, gvec); mutex_lock (&cred->po->np->lock); - err = diskfs_create_protid (cred->po, iohelp_create_iouser (uvec, gvec), - &newpi); + err = diskfs_create_protid (cred->po, user, &newpi); if (! err) { *newport = ports_get_right (newpi); @@ -78,5 +79,6 @@ diskfs_S_io_restrict_auth (struct protid *cred, } mutex_unlock (&cred->po->np->lock); + iohelp_free_iouser (user); return err; } -- cgit v1.2.3