From: Aram Sargsyan Date: Tue, 3 Jan 2023 13:24:38 +0000 (+0000) Subject: Fix a shutdown and error path bugs in rpz.c:update_nodes() X-Git-Tag: v9.19.9~50^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d36728e42f8d099df0dc1d6d8a318ca57f6e57d3;p=thirdparty%2Fbind9.git Fix a shutdown and error path bugs in rpz.c:update_nodes() When shutting down, or when dns_dbiterator_current() fails, 'node' shouldn't be detached, because it is NULL at that point. --- diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index bb9a7ba8514..94ee75bf523 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -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; }