Skip to content

Commit

Permalink
Fixed memory leaks for gzip reader
Browse files Browse the repository at this point in the history
  • Loading branch information
letum authored Jun 16, 2019
1 parent d360e4b commit 7ccb7c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions http_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func (h *httpBackend) Do(request *http.Request, bodySize int) (*Response, error)
if err != nil {
return nil, err
}
defer bodyReader.(*gzip.Reader).Close()
}
body, err := ioutil.ReadAll(bodyReader)
if err != nil {
Expand Down

0 comments on commit 7ccb7c7

Please sign in to comment.