summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-07-21 21:32:09 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-07-21 21:32:09 +0000
commitfc23d8f2d657c682037023b1f1642109307f4d2a (patch)
tree72de5775de23f50d2b578d690f34c50d451871a3
parent2a6154f24863e3ab538ce12b86e4efa51d493a26 (diff)
(diskfs_S_file_invoke_translator): Free initial reference created by
diskfs_make_protid.
-rw-r--r--libdiskfs/file-inv-trans.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libdiskfs/file-inv-trans.c b/libdiskfs/file-inv-trans.c
index 7dc73734..f39d93d0 100644
--- a/libdiskfs/file-inv-trans.c
+++ b/libdiskfs/file-inv-trans.c
@@ -35,6 +35,7 @@ diskfs_S_file_invoke_translator (struct protid *cred __attribute__ ((unused)),
error_t error = 0;
mode_t type;
struct node *np;
+ struct protid *newpi;
/* This code is very similar (but subtly different) from
dir-pathtrans.c and fsys-getroot.c. A way should be found to
@@ -136,13 +137,15 @@ diskfs_S_file_invoke_translator (struct protid *cred __attribute__ ((unused)),
flags &= ~OPENONLY_STATE_MODES;
+ newpi = diskfs_make_protid (diskfs_make_peropen (np, flags,
+ _diskfs_dotdot_file),
+ cred->uids, cred->nuids,
+ cred->gids, cred->ngids);
*retry = FS_RETRY_NONE;
retry_name[0] = '\0';
- *retrypt = (ports_get_right
- (diskfs_make_protid
- (diskfs_make_peropen (np, flags, _diskfs_dotdot_file),
- cred->uids, cred->nuids, cred->gids, cred->ngids)));
+ *retrypt = ports_get_right (newpi);
*retrypttype = MACH_MSG_TYPE_MAKE_SEND;
+ ports_port_deref (newpi);
mutex_unlock (&np->lock);