From 334a7e7ff6e8ce161cc902be9400e26137ed2d06 Mon Sep 17 00:00:00 2001 From: sangluo Date: Wed, 24 Mar 2021 17:58:35 +0800 Subject: [PATCH] close the io.ReadCloser from storage drive Signed-off-by: sangluo --- registry/storage/io.go | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/storage/io.go b/registry/storage/io.go index cd63bb92..561704ae 100644 --- a/registry/storage/io.go +++ b/registry/storage/io.go @@ -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) }