mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 20:25:55 -04:00
Add INSISTs in configure_rpz()
The 'scan-build' job in the CI reports a false positive:
/*
2705 * We are reusing the old rpzs, so it can no longer be its
2704 * first time.
2707 */
2708 pview->rpzs->first_time = false;
>> Access to field 'first_time' results in a dereference of a null pointer (loaded from field 'rpzs')
Add INSISTs to silence the report.
This commit is contained in:
parent
1dd4f95d1e
commit
07d93f176d
1 changed files with 4 additions and 0 deletions
|
|
@ -2697,6 +2697,8 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps,
|
|||
}
|
||||
|
||||
if (*old_rpz_okp) {
|
||||
INSIST(pview->rpzs != NULL);
|
||||
|
||||
/* Discard the newly created rpzs. */
|
||||
dns_rpz_zones_shutdown(view->rpzs);
|
||||
dns_rpz_zones_detach(&view->rpzs);
|
||||
|
|
@ -2711,6 +2713,8 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps,
|
|||
dns_rpz_zones_attach(pview->rpzs, &view->rpzs);
|
||||
dns_rpz_zones_detach(&pview->rpzs);
|
||||
} else if (old != NULL && pview != NULL) {
|
||||
INSIST(pview->rpzs != NULL);
|
||||
|
||||
++pview->rpzs->rpz_ver;
|
||||
view->rpzs->rpz_ver = pview->rpzs->rpz_ver;
|
||||
cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_DEBUG_LEVEL1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue