From: Evan Hunt Date: Wed, 11 May 2022 19:15:46 +0000 (-0700) Subject: the validator can attach to the view normally X-Git-Tag: v9.19.2~36^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=435e29c3e021612b7994ef778d30b85410b6b040;p=thirdparty%2Fbind9.git the validator can attach to the view normally dns_view_weakattach() and _weakdetach() are used by objects that are created by the view and need it to persist until they are destroyed, but don't need to prevent it from being shut down. the validator can use normal view references instead of weak references. --- diff --git a/lib/dns/validator.c b/lib/dns/validator.c index ddb08c481a5..ca5000da77f 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -3137,7 +3137,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, .action = action, .arg = arg }; - dns_view_weakattach(view, &val->view); + dns_view_attach(view, &val->view); isc_mutex_init(&val->lock); result = dns_view_getsecroots(val->view, &val->keytable); @@ -3171,7 +3171,7 @@ cleanup: isc_task_detach(&tclone); isc_event_free(ISC_EVENT_PTR(&event)); - dns_view_weakdetach(&val->view); + dns_view_detach(&val->view); isc_mem_put(view->mctx, val, sizeof(*val)); return (result); @@ -3250,7 +3250,7 @@ destroy(dns_validator_t *val) { isc_mem_put(mctx, val->siginfo, sizeof(*val->siginfo)); } isc_mutex_destroy(&val->lock); - dns_view_weakdetach(&val->view); + dns_view_detach(&val->view); isc_mem_put(mctx, val, sizeof(*val)); }