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.
This commit is contained in:
Jakob Unterwurzacher 2019-01-04 23:35:48 +01:00
parent 8074f12beb
commit c32066c5b0

View File

@ -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)