close the reader under disk cache bitrot verification (#16024)

This commit is contained in:
jiuker authored and GitHub committed 2022-11-09 04:20:11 -08:00
1 parent bbc312fce6
commit 7b7356f04c
1 file changed
+1
+1
View File
@@ -1003,6 +1003,7 @@ func (c *diskCache) bitrotReadFromCache(ctx context.Context, filePath string, of
if err != nil {
return err
}
defer rc.Close()
bufp := c.pool.Get().(*[]byte)
defer c.pool.Put(bufp)