Skip to content

Commit

Permalink
fix: close res body
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Apr 28, 2024
1 parent af4638d commit 8324ead
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ebitenutil/file_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func OpenFile(path string) (ReadSeekCloser, error) {
if err != nil {
return nil, err
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
Expand Down

0 comments on commit 8324ead

Please sign in to comment.