Skip to content

Commit

Permalink
chunked: close payload stream
Browse files Browse the repository at this point in the history
The payload stream must be closed after being used.

Reported here: containers#2041 (comment)

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Oct 24, 2024
1 parent 11fcb78 commit 8b5dadb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/chunked/storage_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ func (c *chunkedDiffer) copyAllBlobToFile(destination *os.File) (digest.Digest,
if payload == nil {
return "", errors.New("invalid stream returned")
}
defer payload.Close()

originalRawDigester := digest.Canonical.Digester()

Expand Down

0 comments on commit 8b5dadb

Please sign in to comment.