]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4146. [bug] Address reference leak that could prevent a clean
authorMark Andrews <marka@isc.org>
Thu, 25 Jun 2015 08:36:27 +0000 (18:36 +1000)
committerMark Andrews <marka@isc.org>
Thu, 25 Jun 2015 08:36:27 +0000 (18:36 +1000)
                        shutdown. [RT #37125]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 0b3373f831a390cd2cd04c9578cd7e3cd2eb3ce4..38ae0d8f3b01018adcb2c6f2b4195edcc20306ea 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4146.  [bug]           Address reference leak that could prevent a clean
+                       shutdown. [RT #37125]
+
 4145.  [bug]           Not all unassociated adb entries where being printed.
                        [RT #37125]
 
index 48a7aa85acd13bbd2a1ce8eaa4602bf25a86d507..e6dde5cbafa112074d07a0077f546da586de00d1 100644 (file)
@@ -1686,6 +1686,11 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        if (query->dispatch != NULL)
                dns_dispatch_detach(&query->dispatch);
 
+       LOCK(&res->buckets[fctx->bucketnum].lock);
+       INSIST(fctx->references > 1);
+       fctx->references--;
+       UNLOCK(&res->buckets[fctx->bucketnum].lock);
+
  cleanup_query:
        if (query->connects == 0) {
                query->magic = 0;