From 616977a942b63fb2ee7545e155abe246f6175308 Mon Sep 17 00:00:00 2001 From: guangwu Date: Tue, 9 Apr 2024 16:48:16 +0800 Subject: [PATCH] fix: close res body (#12444) Signed-off-by: guoguangwu Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> --- integration/client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/client/client.go b/integration/client/client.go index a749789036f0..6e9e861ad970 100644 --- a/integration/client/client.go +++ b/integration/client/client.go @@ -241,6 +241,7 @@ func (c *Client) Metrics() (string, error) { if err != nil { return "", err } + defer res.Body.Close() var sb strings.Builder if _, err := io.Copy(&sb, res.Body); err != nil {