diff --git a/archive/tar.go b/archive/tar.go index e98b3fb57..7e9705891 100644 --- a/archive/tar.go +++ b/archive/tar.go @@ -446,6 +446,7 @@ func createTarFile(ctx context.Context, path, extractDir string, hdr *tar.Header } buf := bufferPool.Get().([]byte) _, err = io.CopyBuffer(file, reader, buf) + bufferPool.Put(buf) if err1 := file.Close(); err == nil { err = err1 }