diff --git a/CHANGES b/CHANGES index b73bf6935a..94ff7d86bb 100644 --- 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.8.2b1 released --- 3220. [bug] Change #3186 was incomplete; dns_db_rpz_findips() diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 54f36603c1..070dd1ce86 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.428.6.12 2011/11/15 21:45:30 each Exp $ */ +/* $Id: resolver.c,v 1.428.6.13 2011/11/23 22:53:13 each Exp $ */ /*! \file */ @@ -4011,8 +4011,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; }