fusefrontend: Open(): fix dirfd leak

Close was missing.
This commit is contained in:
Jakob Unterwurzacher 2018-09-22 20:30:33 +02:00
parent bead82c9fb
commit 63762b33af

View File

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