diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 77658bcd61..cef118c5ce 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -4528,15 +4528,12 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node, foundname, NULL); if (result != ISC_R_SUCCESS) { - break; + if (nodep != NULL) { + *nodep = NULL; + } + goto node_exit; } } - if (result != ISC_R_SUCCESS) { - if (nodep != NULL) { - *nodep = NULL; - } - goto node_exit; - } } result = DNS_R_DELEGATION; if (nodep != NULL) {