From cfe18e8a61d4fd29d4e5e427dbab4ced3bfa8db4 Mon Sep 17 00:00:00 2001 From: Cornelius Weig Date: Mon, 4 Feb 2019 21:27:56 +0100 Subject: [PATCH] It's the callers responsibility to close Body Signed-off-by: Cornelius Weig --- pkg/webhook/kubernetes/deployment.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/webhook/kubernetes/deployment.go b/pkg/webhook/kubernetes/deployment.go index 6afb19de8f1..63190b1995a 100644 --- a/pkg/webhook/kubernetes/deployment.go +++ b/pkg/webhook/kubernetes/deployment.go @@ -139,6 +139,7 @@ func WaitForDeploymentToStabilize(d *appsv1.Deployment, ip string) error { if err != nil { return false, nil } + defer resp.Body.Close() return resp.StatusCode == http.StatusOK, nil }) }