The call to dns_view_flushcache() is done under exclusive mode, but we
still need to check if view->adb is still attached before calling
dns_adb_flush() because the shutdown might have been already
initialized. This most likely only a theoretical problem on shutdown
because there's either no way how to initiate cache flush when shutting
down or very slim window where the `rndc flush` would have to hit the
slim time during named shutdown.
dns_badcache_flush(view->failcache);
}
- dns_adb_flush(view->adb);
+ if (view->adb) {
+ dns_adb_flush(view->adb);
+ }
+
return (ISC_R_SUCCESS);
}