From fe5c4091eefa43e6bc4e45b9a5f4d01537e95946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 27 Oct 2022 08:00:52 +0200 Subject: [PATCH] Close a HTTP response body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miloslav Trmač --- integration/registry.go | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/registry.go b/integration/registry.go index 80d0a7e2..dba34d7a 100644 --- a/integration/registry.go +++ b/integration/registry.go @@ -116,6 +116,7 @@ func (t *testRegistryV2) Ping() error { if err != nil { return err } + defer resp.Body.Close() if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized { return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode) }