Merge pull request #1166 from tonistiigi/alloc_leak
archive: fix allocation leak
This commit is contained in:
commit
9a5db8715b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user