1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Close the response body (#1036)

This commit is contained in:
David Bouchare 2020-12-19 05:20:05 +01:00 committed by GitHub
parent c41411b97e
commit 9ba22f656b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,7 @@ func (client *Client) circleRequest(path string) (*http.Response, error) {
if err != nil {
return nil, err
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return nil, fmt.Errorf(resp.Status)