From 77c3df48ef76aa8fa68744fec1ca19ca28fc13e3 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 1 Jan 2019 20:10:17 +0100 Subject: fusefrontend: fix fd leak in Access() Thanks @slackner! Fixes https://github.com/rfjakob/gocryptfs/issues/306 --- internal/fusefrontend/fs.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal') diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 3f35eb1..0f3d940 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -630,6 +630,7 @@ func (fs *FS) Access(relPath string, mode uint32, context *fuse.Context) (code f return fuse.ToStatus(err) } err = unix.Faccessat(dirfd, cName, mode, unix.AT_SYMLINK_NOFOLLOW) + syscall.Close(dirfd) return fuse.ToStatus(err) } -- cgit v1.2.3