diff --git a/bin/named/query.c b/bin/named/query.c index 70a472d0eb..7f75489c8f 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.197 2001/08/27 06:10:15 marka Exp $ */ +/* $Id: query.c,v 1.198 2001/08/27 17:20:09 gson Exp $ */ #include @@ -2608,10 +2608,17 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) rdataset, sigrdataset); } if (result != ISC_R_SUCCESS) { - INSIST(node == NULL); - INSIST(!dns_rdataset_isassociated(rdataset)); - INSIST(sigrdataset == NULL || - !dns_rdataset_isassociated(sigrdataset)); + /* + * Nonsensical root hints may require cleanup. + */ + if (dns_rdataset_isassociated(rdataset)) + dns_rdataset_disassociate(rdataset); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); + if (node != NULL) + dns_db_detachnode(db, &node); + /* * We don't have any root server hints, but * we may have working forwarders, so try to diff --git a/lib/dns/view.c b/lib/dns/view.c index 405701630a..e6c4d0c9c0 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.c,v 1.102 2001/08/27 06:10:17 marka Exp $ */ +/* $Id: view.c,v 1.103 2001/08/27 17:20:10 gson Exp $ */ #include @@ -998,8 +998,9 @@ dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname, * We can't even find the hints for the root * nameservers! */ + if (dns_rdataset_isassociated(rdataset)) + dns_rdataset_disassociate(rdataset); result = ISC_R_NOTFOUND; - INSIST(!dns_rdataset_isassociated(rdataset)); } }