mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #20823 from nalind/close-that-readcloser
utils: close a couple of ReadClosers
This commit is contained in:
@ -77,6 +77,7 @@ func TarToFilesystem(source string, tarball *os.File) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer tb.Close()
|
||||
_, err = io.Copy(tarball, tb)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -98,6 +99,7 @@ func TarChrootToFilesystem(source string, tarball *os.File) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer tb.Close()
|
||||
_, err = io.Copy(tarball, tb)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user