In rbtdb.c, there were two places where the code touched .references
directly instead of using the helper functions. Use the helper
functions instead.
isc_task_send(task, &event);
} else {
isc_event_free(&event);
- if (isc_refcount_decrement(&rbtdb->references) == 1) {
- (void)isc_refcount_current(&rbtdb->references);
- maybe_free_rbtdb(rbtdb);
- }
+ detach((dns_db_t **)&rbtdb);
}
}
sizeof(*changed));
}
if (event != NULL) {
- isc_refcount_increment(&rbtdb->references);
+ attach((dns_db_t *)rbtdb, &(dns_db_t *){ NULL });
isc_task_send(rbtdb->task, &event);
} else {
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);