From 69ecc711ac0c862b4ec8a186fcd06db8023526a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 13 Sep 2019 10:52:06 +0200 Subject: [PATCH] Move the failure handling block closer to the only place where it could fail --- lib/dns/rbtdb.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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) {