]> 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, 3 Jan 2023 14:21:17 +0000 (14:21 +0000)
When dns_db_createiterator() fails, 'updbit' should not be destroyed
for obvious reasons, i.e. it is NULL.

lib/dns/rpz.c

index 94ee75bf5236cab8429e8147dd9571bb3c507fee..70e341a153e24586d246b675dafaacd36ca894aa 100644 (file)
@@ -1718,7 +1718,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);