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:
parent
8074f12beb
commit
c32066c5b0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user