mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
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.
This commit is contained in:
@@ -1737,7 +1737,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
|
|||||||
|
|
||||||
result = dns__rpz_shuttingdown(rpz->rpzs);
|
result = dns__rpz_shuttingdown(rpz->rpzs);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
dns_db_detachnode(rpz->updb, &node);
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1747,7 +1746,6 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
|
|||||||
DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
|
DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
|
||||||
"rpz: %s: failed to get dbiterator - %s",
|
"rpz: %s: failed to get dbiterator - %s",
|
||||||
domain, isc_result_totext(result));
|
domain, isc_result_totext(result));
|
||||||
dns_db_detachnode(rpz->updb, &node);
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user