From c3a4e142434afa732d40b8bcdb316fa6af31eaad Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Tue, 3 Jan 2023 13:34:58 +0000 Subject: [PATCH] Fix an error path bug in rpz.c:update_nodes() When dns_db_createiterator() fails, 'updbit' should not be destroyed for obvious reasons, i.e. it is NULL. (cherry picked from commit ef4f15d2d1f2b97c1443c3dc0422765bdc06ef9e) --- lib/dns/rpz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 5792320d1f..dbdf6a05fc 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -1725,7 +1725,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, "rpz: %s: failed to create DB iterator - %s", domain, isc_result_totext(result)); - goto cleanup; + return (result); } result = dns_dbiterator_first(updbit);