]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
the validator can attach to the view normally
authorEvan Hunt <each@isc.org>
Wed, 11 May 2022 19:15:46 +0000 (12:15 -0700)
committerEvan Hunt <each@isc.org>
Fri, 13 May 2022 20:36:10 +0000 (13:36 -0700)
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.

lib/dns/validator.c

index ddb08c481a5ca84192517d097b1edc4969b0151a..ca5000da77f2d71cb12cd3f83dcd96ebcc7300d0 100644 (file)
@@ -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));
 }