From 1ca6d4e7c138cd793bd93febbdd712229baf3c1a 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 Upstream-commit: 93ad9c31fce375b29606ea347df28c1205e7cb41 Component: engine --- components/engine/pkg/plugins/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/components/engine/pkg/plugins/client.go b/components/engine/pkg/plugins/client.go index 985f656207..85dbb80b50 100644 --- a/components/engine/pkg/plugins/client.go +++ b/components/engine/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()} }