diff --git a/CHANGES b/CHANGES index 0561ee1770..24b36eb72a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5628. [bug] Host and nslookup could die on SERVFAIL response. + [GL #2564] + 5627. [bug] RRSIG(SOA) RRsets placed anywhere else than at zone apex were triggering infinite resigning loops. This has been fixed. [GL #2650] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 9473219c2a..a4a2ebdaf1 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -1692,14 +1692,13 @@ _query_detach(dig_query_t **queryp, const char *file, unsigned int line) { query_detach(&lookup->current_query); } - if (ISC_LINK_LINKED(query, link)) { - ISC_LIST_UNLINK(lookup->q, query, link); - } - debug("%s:%u:query_detach(%p) = %" PRIuFAST32, file, line, query, isc_refcount_current(&query->references) - 1); if (isc_refcount_decrement(&query->references) == 1) { + if (ISC_LINK_LINKED(query, link)) { + ISC_LIST_UNLINK(lookup->q, query, link); + } destroy_query(query, file, line); } }