From: Aram Sargsyan Date: Wed, 11 Mar 2026 12:39:51 +0000 (+0000) Subject: Fix a bug in rpz.c:del_name() X-Git-Tag: v9.21.21~42^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4df5b9ac32fd3adb9bd1dfa94a778edd1cda04c5;p=thirdparty%2Fbind9.git Fix a bug in rpz.c:del_name() When the dns_qp_getname() call returns an error the del_name() function just returns without cleaning up the trasnaction. Instead of returning, jump to a new label 'done:' similar to the code written in the add_nm() function. --- diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index a7a9408438c..c5e3c9b8df7 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -2272,7 +2272,8 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, result = dns_qp_getname(qp, trig_name, DNS_DBNAMESPACE_NORMAL, (void **)&data, NULL); if (result != ISC_R_SUCCESS) { - return; + INSIST(data == NULL); + goto done; } INSIST(data != NULL); @@ -2315,6 +2316,7 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, RWUNLOCK(&rpz->rpzs->search_lock, isc_rwlocktype_write); } +done: dns_qp_compact(qp, DNS_QPGC_MAYBE); dns_qpmulti_commit(rpzs->table, &qp); }