From: Aram Sargsyan Date: Fri, 24 Feb 2023 19:17:09 +0000 (+0000) Subject: Make sure catz->catzs isn't destroyed before catz X-Git-Tag: v9.19.11~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=030ffbf4753dc9edd34b3ab23c9a559de35b876f;p=thirdparty%2Fbind9.git Make sure catz->catzs isn't destroyed before catz Call dns_catz_unref_catzs() only after detaching 'catz'. --- diff --git a/lib/dns/catz.c b/lib/dns/catz.c index b90fcd277c4..7e28528f571 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -844,14 +844,16 @@ dns__catz_timer_start(dns_catz_zone_t *catz) { static void dns__catz_timer_stop(void *arg) { dns_catz_zone_t *catz = arg; + dns_catz_zones_t *catzs = NULL; REQUIRE(DNS_CATZ_ZONE_VALID(catz)); isc_timer_stop(catz->updatetimer); isc_timer_destroy(&catz->updatetimer); catz->loop = NULL; + catzs = catz->catzs; - dns_catz_unref_catzs(catz->catzs); dns_catz_detach_catz(&catz); + dns_catz_unref_catzs(catzs); } isc_result_t