+/*
+ * Cleanup UST events hashtable.
+ */
+static void destroy_event(struct lttng_ht *events)
+{
+ int ret;
+ struct lttng_ht_node_str *node;
+ struct lttng_ht_iter iter;
+
+ cds_lfht_for_each_entry(events->ht, &iter.iter, node, node) {
+ ret = lttng_ht_del(events, &iter);
+ if (!ret) {
+ call_rcu(&node->head, destroy_event_rcu);
+ }
+ }
+
+ lttng_ht_destroy(events);
+}
+