]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2563. [bug] Dig could leak a socket causing it to wait forever
authorMark Andrews <marka@isc.org>
Wed, 25 Feb 2009 02:39:21 +0000 (02:39 +0000)
committerMark Andrews <marka@isc.org>
Wed, 25 Feb 2009 02:39:21 +0000 (02:39 +0000)
                        to exit. [RT #19359]

CHANGES
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index 258ec98c1d6f5381d83764fdcb24642cd6104028..4d1b75a4dbb45d382a0a857fbee3b39dfcb8b52c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2563.  [bug]           Dig could leak a socket causing it to wait forever
+                       to exit. [RT #19359]
+
 2561.  [doc]           Add isc-config.sh(1) man page. [RT #16378]
 
 2560.  [bug]           Add #include <config.h> to iptable.c. [RT #18258]
index 0d38918ff25459b5f4601096f6660652e87ea1ee..470261cb2da7da35f360b3bba629c519541e6d00 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.311.70.7 2009/01/20 05:04:24 marka Exp $ */
+/* $Id: dighost.c,v 1.311.70.8 2009/02/25 02:39:21 marka Exp $ */
 
 /*! \file
  *  \note
@@ -2396,8 +2396,14 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
                cq = query->lookup->current_query;
                if (!l->tcp_mode)
                        send_udp(ISC_LIST_NEXT(cq, link));
-               else
+               else {
+                       isc_socket_cancel(query->sock, NULL,
+                                         ISC_SOCKCANCEL_ALL);
+                       isc_socket_detach(&query->sock);
+                       sockcount--;
+                       debug("sockcount=%d", sockcount);
                        send_tcp_connect(ISC_LIST_NEXT(cq, link));
+               }
                UNLOCK_LOOKUP;
                return;
        }