mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-01 21:10:55 -05:00
[36720] Free event early (fixes race to free)
Patch contributed by yhu2 <yadi.hu@windriver.com>.
This commit is contained in:
parent
fffcc1b135
commit
a338c2d947
2 changed files with 8 additions and 6 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
3910. [bug] Fix races to free event during shutdown. [RT#36720]
|
||||
|
||||
3909. [bug] When computing the number of elements required for a
|
||||
acl count_acl_elements could have a short count leading
|
||||
to a assertion failure. Also zero out new acl elements
|
||||
|
|
|
|||
|
|
@ -627,6 +627,8 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNUSED(task);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
LOCK(&view->lock);
|
||||
|
||||
view->attributes |= DNS_VIEWATTR_RESSHUTDOWN;
|
||||
|
|
@ -634,8 +636,6 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNLOCK(&view->lock);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
if (done)
|
||||
destroy(view);
|
||||
}
|
||||
|
|
@ -651,6 +651,8 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNUSED(task);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
LOCK(&view->lock);
|
||||
|
||||
view->attributes |= DNS_VIEWATTR_ADBSHUTDOWN;
|
||||
|
|
@ -658,8 +660,6 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNLOCK(&view->lock);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
if (done)
|
||||
destroy(view);
|
||||
}
|
||||
|
|
@ -675,6 +675,8 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNUSED(task);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
LOCK(&view->lock);
|
||||
|
||||
view->attributes |= DNS_VIEWATTR_REQSHUTDOWN;
|
||||
|
|
@ -682,8 +684,6 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
UNLOCK(&view->lock);
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
if (done)
|
||||
destroy(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue