From 73a41a725ab567c9965fcc153242a706a370957d Mon Sep 17 00:00:00 2001 From: Ritesh H Shukla Date: Fri, 16 Oct 2020 12:40:36 -0700 Subject: [PATCH] Always close response body (#10697) --- pkg/madmin/bandwidth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/madmin/bandwidth.go b/pkg/madmin/bandwidth.go index 4452b1824..19221da62 100644 --- a/pkg/madmin/bandwidth.go +++ b/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 {