Skip to content

Commit

Permalink
fixed a goroutine leak (#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktarplee committed May 19, 2023
1 parent 0ec36ad commit 2015ceb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/v1/layout/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func (l Path) WriteBlob(hash v1.Hash, r io.ReadCloser) error {
}

func (l Path) writeBlob(hash v1.Hash, size int64, rc io.ReadCloser, renamer func() (v1.Hash, error)) error {
defer rc.Close()
if hash.Hex == "" && renamer == nil {
panic("writeBlob called an invalid hash and no renamer")
}
Expand Down

0 comments on commit 2015ceb

Please sign in to comment.