diff --git a/cmd/format-disk-cache.go b/cmd/format-disk-cache.go index a8930cc98..325aceeec 100644 --- a/cmd/format-disk-cache.go +++ b/cmd/format-disk-cache.go @@ -354,6 +354,7 @@ func migrateCacheData(ctx context.Context, c *diskCache, bucket, object, oldfile if err != nil { return err } + defer readCloser.Close() var reader io.Reader = readCloser actualSize := uint64(st.Size())