From 466a05eaf0070f6984d50428454ab399258da5e1 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Mon, 27 Feb 2023 12:06:37 +0000 Subject: [PATCH 1/2] Fix a cleanup bug when isc_task_create() fails in dns_catz_new_zones() Use isc_mem_putanddetach() instead of isc_mem_put() to detach from the memory context. (cherry picked from commit 9050481d1f3db1a007fb02ab1b186af94d2de1bc) --- lib/dns/catz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 4319de8af0..9a9ecd0dc9 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -630,7 +630,7 @@ cleanup_ht: isc_ht_destroy(&new_zones->zones); isc_refcount_destroy(&new_zones->refs); isc_mutex_destroy(&new_zones->lock); - isc_mem_put(mctx, new_zones, sizeof(*new_zones)); + isc_mem_putanddetach(&new_zones->mctx, new_zones, sizeof(*new_zones)); return (result); } From 6857f5a72985293942be28ddb7a95560ae227451 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Mon, 27 Feb 2023 12:11:02 +0000 Subject: [PATCH 2/2] Add a CHANGES note for [GL #3900] (cherry picked from commit d96d8dc651a2685d772d0cd92b1d7cf9db7fd883) --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index ad097e65ac..5bb7f5f607 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +6116. [bug] Fix error path cleanup issue in the dns_catz_new_zones() + function. [GL #3900] + 6105. [bug] Detach 'rpzs' and 'catzs' from the previous view in configure_rpz() and configure_catz(), respectively, just after attaching it to the new view. [GL #3880]