]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix an error path bug in rpz.c:update_nodes()
authorAram Sargsyan <aram@isc.org>
Tue, 3 Jan 2023 13:34:58 +0000 (13:34 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 14 Feb 2023 10:26:37 +0000 (10:26 +0000)
When dns_db_createiterator() fails, 'updbit' should not be destroyed
for obvious reasons, i.e. it is NULL.

(cherry picked from commit ef4f15d2d1f2b97c1443c3dc0422765bdc06ef9e)

lib/dns/rpz.c

index 5792320d1f425185dbe50db4acd377cfbfb223e2..dbdf6a05fca0726fc9af472bd2a9663ece752c91 100644 (file)
@@ -1725,7 +1725,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
                              DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                              "rpz: %s: failed to create DB iterator - %s",
                              domain, isc_result_totext(result));
-               goto cleanup;
+               return (result);
        }
 
        result = dns_dbiterator_first(updbit);