]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move the failure handling block closer to the only place where it could fail
authorOndřej Surý <ondrej@sury.org>
Fri, 13 Sep 2019 08:52:06 +0000 (10:52 +0200)
committerMark Andrews <marka@isc.org>
Fri, 4 Oct 2019 04:08:26 +0000 (14:08 +1000)
(cherry picked from commit 69ecc711ac0c862b4ec8a186fcd06db8023526a6)

lib/dns/rbtdb.c

index c012a654f0e2d620edb50f946180d9750d2bf307..cf1ab46d893f9e8c87a8831e6dfc5c6ca9173c74 100644 (file)
@@ -4570,14 +4570,11 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
                                                                      foundname,
                                                                      NULL);
                                        if (result != ISC_R_SUCCESS) {
-                                               break;
-                                       }
-                               }
-                               if (result != ISC_R_SUCCESS) {
-                                       if (nodep != NULL) {
-                                               *nodep = NULL;
+                                               if (nodep != NULL) {
+                                                       *nodep = NULL;
+                                               }
+                                               goto node_exit;
                                        }
-                                       goto node_exit;
                                }
                        }
                        result = DNS_R_DELEGATION;