]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Be sure to not leak a socket if tcpConnectionHandler() throws. 16374/head
authorMiod Vallat <miod.vallat@powerdns.com>
Mon, 27 Oct 2025 06:33:56 +0000 (07:33 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Mon, 27 Oct 2025 06:33:56 +0000 (07:33 +0100)
Fixes: #16365
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/dumresp.cc

index 96565a025ef539e85f0334d2bbaaebf97639c74a..225d8f4c7d4f6032f6c7858dc9e7675fee2e7a4d 100644 (file)
@@ -100,6 +100,7 @@ try
 }
 catch(const std::exception& e) {
   cerr<<"TCP connection handler got an exception: "<<e.what()<<endl;
+  close(sock);
 }
 
 static void tcpAcceptor(const ComboAddress local)