From 4043238ede86eb42dad0bd4eae0b51cb351e80ab Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 31 Jan 2022 12:44:39 +0100 Subject: [PATCH] Initialize isNew before calling a exception throwing function --- pdns/lwres.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 16aa2c47cf..90f1c84d4d 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -441,6 +441,7 @@ static LWResult::Result asyncresolve(const ComboAddress& ip, const DNSName& doma // work, we give up. For reused connections, we assume the // peer has closed it on error, so we retry. At some point we // *will* get a new connection, so this loop is not endless. + isNew = true; // tcpconnect() might throw for new connections. In that case, we want to break the loop isNew = tcpconnect(*now, ip, connection, dnsOverTLS); ret = tcpsendrecv(ip, connection, localip, vpacket, len, buf); #ifdef HAVE_FSTRM -- 2.47.2