diff options
author | Jakob Unterwurzacher | 2019-01-04 23:35:48 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-01-04 23:35:48 +0100 |
commit | c32066c5b0ae716ba43999bf808c5baa7e08edd0 (patch) | |
tree | d4c5b1c0a714671cb33d981350118e45b0dc7dfe /internal | |
parent | 8074f12bebbaafd2c498183a914f021d32d34578 (diff) |
fusefrontend: fix fd leak in dirCache
The missing break meant that we may find a second
hit in the cache, Dup() a second fd, and leak the first
one.
Thanks @slackner for finding this.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/fusefrontend/dircache.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/fusefrontend/dircache.go b/internal/fusefrontend/dircache.go index 38f0f1c..7e80ddc 100644 --- a/internal/fusefrontend/dircache.go +++ b/internal/fusefrontend/dircache.go @@ -122,6 +122,7 @@ func (d *dirCacheStruct) Lookup(dirRelPath string) (fd int, iv []byte) { return -1, nil } iv = e.iv + break } if fd == 0 { d.dbg("Lookup %q: miss\n", dirRelPath) |