aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/rfs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-12-07 09:01:12 +0100
committerJakob Unterwurzacher2017-12-07 09:01:12 +0100
commit48bd59f38843e5ebd4e4c9f666f1aea1c9990803 (patch)
treea94eb8d428f255ddbf1697cde9c711149be9e18b /internal/fusefrontend_reverse/rfs.go
parent87736eb833dfcf3f110dbd8846752c86aae7b481 (diff)
fusefrontend_reverse: fix fd leak in GetAttr
Fixes https://github.com/rfjakob/gocryptfs/issues/184
Diffstat (limited to 'internal/fusefrontend_reverse/rfs.go')
-rw-r--r--internal/fusefrontend_reverse/rfs.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go
index d87a936..3ac626f 100644
--- a/internal/fusefrontend_reverse/rfs.go
+++ b/internal/fusefrontend_reverse/rfs.go
@@ -161,6 +161,7 @@ func (rfs *ReverseFS) GetAttr(relPath string, context *fuse.Context) (*fuse.Attr
if err != nil {
return nil, fuse.ToStatus(err)
}
+ syscall.Close(dirFd)
// Instead of risking an inode number collision, we return an error.
if st.Ino > inoBaseMin {
tlog.Warn.Printf("GetAttr %q: backing file inode number %d crosses reserved space, max=%d. Returning EOVERFLOW.",