summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-03-16 04:16:28 +0000
committerMiles Bader <miles@gnu.org>1996-03-16 04:16:28 +0000
commitde7e48f40992b58eb8900298c720e8dd66910dc4 (patch)
tree1660c3bb7aeba1f26b125c106e4310b7f9a0015a /libdiskfs
parentec9c794798d0e519e18eb30dbaf9f7b689c746b1 (diff)
(diskfs_S_dir_lookup): Don't leak a send right to the anonymous handle on DNP
when calling fetch_root.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-lookup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index fd0ebc72..59e850cd 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -245,6 +245,10 @@ diskfs_S_dir_lookup (struct protid *dircred,
_diskfs_translator_callback2,
retry, retryname, returned_port);
+ /* fetch_root copies DIRPORT for success, so we always should
+ deallocate our send right. */
+ mach_port_deallocate (mach_task_self (), dirport);
+
if (error != ENOENT)
{
diskfs_nrele (dnp);