From: Aram Sargsyan Date: Fri, 27 Jan 2023 08:47:52 +0000 (+0000) Subject: catz: unregister the db update-notify callback before detaching from db X-Git-Tag: v9.19.11~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf79692a662b627d2230fbf7ae67f55cf729180c;p=thirdparty%2Fbind9.git catz: unregister the db update-notify callback before detaching from db When detaching from the previous version of the database, make sure that the update-notify callback is unregistered, otherwise there is an INSIST check which can generate an assertion failure in free_rbtdb(), which checks that there are no outstanding update listeners in the list. There is a similar code already in place for RPZ. --- diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 97241d1352c..2faef311322 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -2106,6 +2106,8 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) { if (catz->dbversion != NULL) { dns_db_closeversion(catz->db, &catz->dbversion, false); } + dns_db_updatenotify_unregister( + catz->db, dns_catz_dbupdate_callback, catz->catzs); dns_db_detach(&catz->db); /* * We're not registering db update callback, it will be