Closing the file handler after finishing readat

This commit is contained in:
Diptanu Choudhury
2016-01-13 14:39:06 -08:00
parent ee369382aa
commit 78d03616f6

View File

@@ -260,6 +260,7 @@ func (d *AllocDir) FSReadAt(allocID string, path string, offset int64, limit int
if err != nil {
return err
}
defer f.Close()
io.Copy(w, io.LimitReader(f, limit))
return nil
}