From 48e8d70b88dcde79589e99583b676f0c293f026c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 4 Jul 2016 17:00:15 +0200 Subject: [PATCH] auth: Close the TCP connection descriptor if `pthread_create()` failed --- pdns/tcpreceiver.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 4e52eadb0..416db2bc1 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); } } } -- 2.40.0