mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
metacache: Always close the s2 writer (#10836)
The s2 writer could be leaked if there was an error. Make sure it is always closed.
This commit is contained in:
@@ -47,11 +47,6 @@ func loadMetacacheSampleEntries(t testing.TB) metaCacheEntriesSorted {
|
||||
if err != io.EOF {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if false {
|
||||
w := newMetacacheFile("testdata/metacache-new.s2")
|
||||
w.write(entries.entries()...)
|
||||
w.Close()
|
||||
}
|
||||
|
||||
return entries
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user