Skip to content

Commit

Permalink
Merge pull request #20823 from nalind/close-that-readcloser
Browse files Browse the repository at this point in the history
utils: close a couple of ReadClosers
  • Loading branch information
openshift-merge-bot[bot] authored Nov 29, 2023
2 parents d6fefe0 + cf1ad30 commit e0a524f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e0a524f

Please sign in to comment.