]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3221. [bug] Fixed a potential coredump on shutdown due to
authorEvan Hunt <each@isc.org>
Wed, 23 Nov 2011 22:52:46 +0000 (22:52 +0000)
committerEvan Hunt <each@isc.org>
Wed, 23 Nov 2011 22:52:46 +0000 (22:52 +0000)
referencing fetch context after it's been freed.
[RT #26720]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 7d155325b808d48725c26f50d4bd11323fb15292..7cc64bf1a3037e926c90625574af8bd09588c7c5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3221.  [bug]           Fixed a potential coredump on shutdown due to
+                       referencing fetch context after it's been freed.
+                       [RT #26720]
+
        --- 9.7.5b1 released ---
 
 3218.  [security]      Cache lookup could return RRSIG data associated with
index 80713925accbcf7e2a6c61fbac1374d66f96307c..64d10eca4ee969f67d3cb11af5476a37bbcd9866 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.413.14.22 2011/11/15 21:46:07 each Exp $ */
+/* $Id: resolver.c,v 1.413.14.23 2011/11/23 22:52:46 each Exp $ */
 
 /*! \file */
 
@@ -4066,8 +4066,10 @@ validated(isc_task_t *task, isc_event_t *event) {
         * so, destroy the fctx.
         */
        if (SHUTTINGDOWN(fctx) && !sentresponse) {
+               isc_mutex_t *bucketlock =
+                       &fctx->res->buckets[fctx->bucketnum].lock;
                maybe_destroy(fctx, ISC_TRUE);
-               UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock);
+               UNLOCK(bucketlock);
                goto cleanup_event;
        }