v9_10_sub: decrement_reference() not effective for node cleanup
decrement_reference()
doesn't appear effective for node cleanup in 9.10-sub. This is because clean_cache_node()
fails to set node->data
to NULL after freeing the rbtdb_data_t
when all data under it has been cleaned up.
Something like this is required:
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
index 5730d3b14e..eb23137681 100644
--- a/lib/dns/rbtdb.c
+++ b/lib/dns/rbtdb.c
@@ -1990,6 +1990,13 @@ clean_cache_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
rbtdb->common.mctx,
clean_iptree_nodedata,
rbtdb);
+
+ if ((data->nonecs_data == NULL) &&
+ (data->ecs_root == NULL))
+ {
+ isc_mem_put(rbtdb->common.mctx, data, sizeof(*data));
+ node->data = NULL;
+ }
}
node->dirty = 0;