summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-09-22 20:30:33 +0200
committerJakob Unterwurzacher2018-09-23 12:17:59 +0200
commit63762b33afd387ee45d40dec6f42653bd4dd5f98 (patch)
tree1e9b5cec16d758e5a1f0eb054f169cb6f6e1b6f0 /internal
parentbead82c9fb91cbae0290523b57eec421e5218177 (diff)
fusefrontend: Open(): fix dirfd leak
Close was missing.
Diffstat (limited to 'internal')
-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 71d550e..d1f031a 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -129,6 +129,7 @@ func (fs *FS) Open(path string, flags uint32, context *fuse.Context) (fuseFile n
if err != nil {
return nil, fuse.ToStatus(err)
}
+ defer syscall.Close(dirfd)
fd, err := syscallcompat.Openat(dirfd, cName, newFlags, 0)
// Handle a few specific errors
if err != nil {