From: Remi Gacogne Date: Mon, 19 Jul 2021 16:06:05 +0000 (+0200) Subject: dnsdist: Properly close the cross-connections pipes in case of error X-Git-Tag: dnsdist-1.7.0-alpha1~23^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ce01ecc4fe7d51f965beff26229f22fd2514f2;p=thirdparty%2Fpdns.git dnsdist: Properly close the cross-connections pipes in case of error --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 7673eaacc6..4e0fdec163 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -178,6 +178,8 @@ void TCPClientCollection::addTCPClientThread() if (d_numthreads >= d_tcpclientthreads.size()) { vinfolog("Adding a new TCP client thread would exceed the vector size (%d/%d), skipping. Consider increasing the maximum amount of TCP client threads with setMaxTCPClientThreads() in the configuration.", d_numthreads.load(), d_tcpclientthreads.size()); + close(crossProtocolFDs[0]); + close(crossProtocolFDs[1]); close(pipefds[0]); close(pipefds[1]); return;