Always close response body (#10697)

master
Ritesh H Shukla 4 years ago committed by GitHub
parent 1aec168c84
commit 73a41a725a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/madmin/bandwidth.go

@ -42,8 +42,8 @@ func (adm *AdminClient) GetBucketBandwidth(ctx context.Context, buckets ...strin
}
resp, err := adm.executeMethod(ctx, http.MethodGet, reqData)
defer closeResponse(resp)
if err != nil {
closeResponse(resp)
return bandwidth.Report{}, err
}
if resp.StatusCode != http.StatusOK {

Loading…
Cancel
Save