From 13665367df7421a8900f69a5ce641fbab9fe21b7 Mon Sep 17 00:00:00 2001 From: "genglu.gl" Date: Fri, 11 Feb 2022 14:53:14 +0800 Subject: [PATCH] Close readclosers returned by DecompressStream Signed-off-by: genglu.gl --- solver/llbsolver/file/unpack.go | 1 + 1 file changed, 1 insertion(+) diff --git a/solver/llbsolver/file/unpack.go b/solver/llbsolver/file/unpack.go index 8e530526..41ea222f 100644 --- a/solver/llbsolver/file/unpack.go +++ b/solver/llbsolver/file/unpack.go @@ -55,6 +55,7 @@ func isArchivePath(path string) bool { if err != nil { return false } + defer rdr.Close() r := tar.NewReader(rdr) _, err = r.Next() return err == nil