2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Release all resources when shutting down an RPZ zone during an update

If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().
This commit is contained in:
Michał Kępień
2018-10-29 22:29:31 +01:00
committed by Witold Kręcicki
parent faf2c7711a
commit 139bc2c6ab

View File

@@ -2112,6 +2112,14 @@ rpz_detach(dns_rpz_zone_t **rpzp, dns_rpz_zones_t *rpzs) {
}
if (rpz->updaterunning) {
isc_task_purgeevent(rpz->rpzs->updater, &rpz->updateevent);
if (rpz->updbit != NULL) {
dns_dbiterator_destroy(&rpz->updbit);
}
if (rpz->newnodes != NULL) {
isc_ht_destroy(&rpz->newnodes);
}
dns_db_closeversion(rpz->updb, &rpz->updbversion, false);
dns_db_detach(&rpz->updb);
}
isc_timer_reset(rpz->updatetimer, isc_timertype_inactive,