]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a shutdown and error path bugs in rpz.c:update_nodes()
authorAram Sargsyan <aram@isc.org>
Tue, 3 Jan 2023 13:24:38 +0000 (13:24 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 14 Feb 2023 10:26:37 +0000 (10:26 +0000)
When shutting down, or when dns_dbiterator_current() fails, 'node'
shouldn't be detached, because it is NULL at that point.

(cherry picked from commit d36728e42f8d099df0dc1d6d8a318ca57f6e57d3)

lib/dns/rpz.c

index eb19c4d7afe3cb3d1683183f2c12ea51551f63f7..5792320d1f425185dbe50db4acd377cfbfb223e2 100644 (file)
@@ -1744,7 +1744,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
 
                result = dns__rpz_shuttingdown(rpz->rpzs);
                if (result != ISC_R_SUCCESS) {
-                       dns_db_detachnode(rpz->updb, &node);
                        goto cleanup;
                }
 
@@ -1754,7 +1753,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "rpz: %s: failed to get dbiterator - %s",
                                      domain, isc_result_totext(result));
-                       dns_db_detachnode(rpz->updb, &node);
                        goto cleanup;
                }