]> 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>
Tue, 1 Oct 2019 00:43:26 +0000 (10:43 +1000)
lib/dns/rbtdb.c

index 77658bcd617de23e17a5148fb20e936f34637136..cef118c5ce9a123a0ce0a764fca70001a864adf5 100644 (file)
@@ -4528,14 +4528,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;