close the io.ReadCloser from storage driver

Backport PR #3309 to release/2.7

Signed-off-by: Wang Yan <wangyan@vmware.com>
pull/3370/head
Wang Yan 2021-02-23 18:47:56 +08:00
parent 6300300270
commit 3fe1d67ace
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ func getContent(ctx context.Context, driver driver.StorageDriver, p string) ([]b
if err != nil {
return nil, err
}
defer r.Close()
return readAllLimited(r, maxBlobGetSize)
}