From a451d1cb8d42c3fc0785f772208a2e7918aa1fb1 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Tue, 7 Feb 2023 02:41:41 +0800 Subject: [PATCH] fix: close resp.body checking for kubernetes version (#16547) --- cmd/admin-handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 7a6ba7bd6..df77cff96 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1901,7 +1901,7 @@ func getKubernetesInfo(dctx context.Context) madmin.KubernetesInfo { ki.Error = err.Error() return ki } - + defer resp.Body.Close() decoder := json.NewDecoder(resp.Body) if err := decoder.Decode(&ki); err != nil { ki.Error = err.Error()