From de7e48f40992b58eb8900298c720e8dd66910dc4 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 16 Mar 1996 04:16:28 +0000 Subject: (diskfs_S_dir_lookup): Don't leak a send right to the anonymous handle on DNP when calling fetch_root. --- libdiskfs/dir-lookup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libdiskfs/dir-lookup.c') 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); -- cgit v1.2.3