Commit b8dcc13b authored by Mark Andrews's avatar Mark Andrews
Browse files

4335. [bug] zone->view could be detached too early. [RT #41942]

parent 6e3839e1
4335. [bug] zone->view could be detached too early. [RT #41942]
4334. [func] 'named -V' now reports zlib version. [RT #41913]
4333. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42 and
......
......@@ -3238,10 +3238,12 @@ ns_stats_dump(ns_server_t *server, FILE *fp) {
if (zonestats != NULL) {
char zonename[DNS_NAME_FORMATSIZE];
dns_name_format(dns_zone_getorigin(zone),
zonename, sizeof(zonename));
view = dns_zone_getview(zone);
if (view == NULL)
continue;
dns_name_format(dns_zone_getorigin(zone),
zonename, sizeof(zonename));
fprintf(fp, "[%s", zonename);
if (strcmp(view->name, "_default") != 0)
fprintf(fp, " (view: %s)", view->name);
......
......@@ -1111,6 +1111,8 @@ zone_free(dns_zone_t *zone) {
isc_task_detach(&zone->task);
if (zone->loadtask != NULL)
isc_task_detach(&zone->loadtask);
if (zone->view != NULL)
dns_view_weakdetach(&zone->view);
/* Unmanaged objects */
for (signing = ISC_LIST_HEAD(zone->signing);
......@@ -12286,9 +12288,6 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) {
zone->irefs--;
}
if (zone->view != NULL)
dns_view_weakdetach(&zone->view);
/*
* We have now canceled everything set the flag to allow exit_check()
* to succeed. We must not unlock between setting this flag and
......
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