From 93ad9c31fce375b29606ea347df28c1205e7cb41 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 --- pkg/plugins/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/plugins/client.go b/pkg/plugins/client.go index 985f656207..85dbb80b50 100644 --- a/pkg/plugins/client.go +++ b/pkg/plugins/client.go @@ -124,6 +124,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()} }