Commit 34a5ad82 authored by Mark Andrews's avatar Mark Andrews Committed by Ondřej Surý
Browse files

Address race between zone_maintenance and dns_zone_setview_helper

There was a possible NULL dereference due to data race between accessing
zone->view and zone->view->adb.

(cherry picked from commit 67c8f732)
parent b6e308b9
Pipeline #44912 failed with stages
in 54 minutes and 31 seconds
......@@ -10819,7 +10819,7 @@ zone_maintenance(dns_zone_t *zone) {
const char me[] = "zone_maintenance";
isc_time_t now;
isc_result_t result;
bool dumping, load_pending;
bool dumping, load_pending, viewok;
......@@ -10842,7 +10842,10 @@ zone_maintenance(dns_zone_t *zone) {
* 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) {
viewok = (zone->view != NULL && zone->view->adb != NULL);
if (!viewok) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment