From f2bc9164873bdec092456aba719d7e17d10fa342 Mon Sep 17 00:00:00 2001 From: T K Chandra Hasan Date: Thu, 20 Mar 2025 16:23:04 +0530 Subject: [PATCH] Fix SIGSEGV in proxyDialer Incase of error, the response from net/HTTP ReadResponse is always nil and no need to close the Body. Signed-off-by: T K Chandra Hasan --- internal/communicator/ssh/http_proxy.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/communicator/ssh/http_proxy.go b/internal/communicator/ssh/http_proxy.go index e171380ab3..b175b6d530 100644 --- a/internal/communicator/ssh/http_proxy.go +++ b/internal/communicator/ssh/http_proxy.go @@ -100,7 +100,6 @@ func (p *proxyDialer) Dial(network, addr string) (net.Conn, error) { res, err := http.ReadResponse(bufio.NewReader(c), req) if err != nil { - res.Body.Close() c.Close() return nil, err }