There was a possible NULL dereference due to data race between accessing
zone->view and zone->view->adb.
const char me[] = "zone_maintenance";
isc_time_t now;
isc_result_t result;
- bool dumping, load_pending;
+ bool dumping, load_pending, viewok;
REQUIRE(DNS_ZONE_VALID(zone));
ENTER;
* adb or resolver will be NULL, and we had better not try
* to do further maintenance on it.
*/
- if (zone->view == NULL || zone->view->adb == NULL) {
+ LOCK_ZONE(zone);
+ viewok = (zone->view != NULL && zone->view->adb != NULL);
+ UNLOCK_ZONE(zone);
+ if (!viewok) {
return;
}