diff --git a/bin/named/server.c b/bin/named/server.c index 87df9669b3..44d706bdc0 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -2646,6 +2646,7 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps, dns_rpz_shutdown_rpzs(view->rpzs); dns_rpz_detach_rpzs(&view->rpzs); dns_rpz_attach_rpzs(pview->rpzs, &view->rpzs); + dns_rpz_detach_rpzs(&pview->rpzs); } else if (old != NULL && pview != NULL) { ++pview->rpzs->rpz_ver; view->rpzs->rpz_ver = pview->rpzs->rpz_ver; @@ -3179,6 +3180,7 @@ configure_catz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t *config, if (old != NULL) { dns_catz_catzs_detach(&view->catzs); dns_catz_catzs_attach(pview->catzs, &view->catzs); + dns_catz_catzs_detach(&pview->catzs); dns_catz_prereconfig(view->catzs); } @@ -6012,9 +6014,6 @@ cleanup: named_config_get(maps, "catalog-zones", &obj) == ISC_R_SUCCESS) { - if (pview->catzs != NULL) { - dns_catz_catzs_detach(&pview->catzs); - } /* * We are swapping the places of the `view` and * `pview` in the function's parameters list