From db5803a0ecb0dc441940c950ed35937bf2bda873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 27 Nov 2024 14:12:50 +0100 Subject: [PATCH] Use attach()/detach() functions instead of touching .references In rbtdb.c, there were places where the code touched .references directly instead of using the helper functions. Use the helper functions instead. --- lib/dns/rbtdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index ffd7801c06..7d97640f84 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -1417,7 +1417,7 @@ dns__rbtdb_decref(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, UNUSED(refs); #endif - if (KEEP_NODE(node, rbtdb, (locked || write_locked))) { + if (KEEP_NODE(node, rbtdb, locked || write_locked)) { goto restore_locks; } @@ -2030,7 +2030,7 @@ dns__rbtdb_closeversion(dns_db_t *db, dns_dbversion_t **versionp, sizeof(*changed)); } if (rbtdb->loop != NULL) { - isc_refcount_increment(&rbtdb->common.references); + dns_db_attach((dns_db_t *)rbtdb, &(dns_db_t *){ NULL }); isc_async_run(rbtdb->loop, cleanup_dead_nodes_callback, rbtdb); } else {