From: Remi Gacogne Date: Mon, 4 Jul 2016 15:00:15 +0000 (+0200) Subject: auth: Close the TCP connection descriptor if `pthread_create()` failed X-Git-Tag: rec-4.0.0~19^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4099%2Fhead;p=thirdparty%2Fpdns.git auth: Close the TCP connection descriptor if `pthread_create()` failed --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 4e52eadb08..416db2bc1c 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -1299,6 +1299,7 @@ void TCPNameserver::thread() if(pthread_create(&tid, 0, &doConnection, reinterpret_cast(fd))) { L<post(); + close(fd); } } }