]> 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, 3 Jan 2023 14:21:17 +0000 (14:21 +0000)
When shutting down, or when dns_dbiterator_current() fails, 'node'
shouldn't be detached, because it is NULL at that point.

lib/dns/rpz.c

index bb9a7ba8514d1e2af12b2fc4bd0c40a8a5c62706..94ee75bf5236cab8429e8147dd9571bb3c507fee 100644 (file)
@@ -1737,7 +1737,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;
                }
 
@@ -1747,7 +1746,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;
                }