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

This commit is contained in:
jiuker 2022-11-09 20:20:11 +08:00 committed by GitHub
parent bbc312fce6
commit 7b7356f04c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)