From 90246df5d413c6b6a2d57d66c48c2fe3206eb42b Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 5 Feb 2014 23:57:39 +0100 Subject: trans/fakeroot: fix right leak * trans/fakeroot.c (netfs_S_dir_lookup): Deallocate rights to intermediate file systems. --- trans/fakeroot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 0e0b618a..3dce22e8 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -287,6 +287,8 @@ netfs_S_dir_lookup (struct protid *diruser, err = dir_lookup (dir, filename, flags & (O_NOLINK|O_RDWR|O_EXEC|O_CREAT|O_EXCL|O_NONBLOCK), mode, do_retry, retry_name, &file); + if (dir != dnp->nn->file) + mach_port_deallocate (mach_task_self (), dir); if (err) return err; -- cgit v1.2.3