3576. [bug] Address a shutdown race when validating. [RT #33573]

(cherry picked from commit 2cd3c8856c)
This commit is contained in:
Mark Andrews
2013-05-29 18:03:59 +10:00
parent e9e90a989d
commit 91fdf4c601
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -1,3 +1,5 @@
3576. [bug] Address a shutdown race when validating. [RT #33573]
3574. [doc] The 'hostname' keyword was missing from server-id
description in the named.conf man page. [RT #33476]
+3 -3
View File
@@ -3718,7 +3718,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
if (val == NULL)
return (ISC_R_NOMEMORY);
val->view = NULL;
dns_view_weakattach(view, &val->view);
dns_view_attach(view, &val->view);
event = (dns_validatorevent_t *)
isc_event_allocate(view->mctx, task,
@@ -3792,7 +3792,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
isc_event_free(ISC_EVENT_PTR(&event));
cleanup_val:
dns_view_weakdetach(&val->view);
dns_view_detach(&val->view);
isc_mem_put(view->mctx, val, sizeof(*val));
return (result);
@@ -3872,7 +3872,7 @@ destroy(dns_validator_t *val) {
if (val->siginfo != NULL)
isc_mem_put(mctx, val->siginfo, sizeof(*val->siginfo));
DESTROYLOCK(&val->lock);
dns_view_weakdetach(&val->view);
dns_view_detach(&val->view);
val->magic = 0;
isc_mem_put(mctx, val, sizeof(*val));
}