From ba797dd6a2735485d4bd8c31be585b6529e10348 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 24 Feb 2016 20:09:51 -0500 Subject: [PATCH] Close resp body on plugin call error Signed-off-by: Brian Goff (cherry picked from commit 93ad9c31fce375b29606ea347df28c1205e7cb41) --- pkg/plugins/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/plugins/client.go b/pkg/plugins/client.go index ba7772dfbb..996d4afeb9 100644 --- a/pkg/plugins/client.go +++ b/pkg/plugins/client.go @@ -122,6 +122,7 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool) if resp.StatusCode != http.StatusOK { b, err := ioutil.ReadAll(resp.Body) + resp.Body.Close() if err != nil { return nil, &statusError{resp.StatusCode, serviceMethod, err.Error()} }