summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-01 20:10:17 +0100
committerJakob Unterwurzacher2019-01-01 20:10:17 +0100
commit77c3df48ef76aa8fa68744fec1ca19ca28fc13e3 (patch)
tree28426aa1d5062adb946ae46117bd766312118a9f /internal/fusefrontend/fs.go
parent887d5aa8e74e20b065b9a0c9b6e99dd05815112a (diff)
fusefrontend: fix fd leak in Access()
Thanks @slackner! Fixes https://github.com/rfjakob/gocryptfs/issues/306
Diffstat (limited to 'internal/fusefrontend/fs.go')
-rw-r--r--internal/fusefrontend/fs.go1
1 files changed, 1 insertions, 0 deletions
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)
}