return LTTCOMM_OK;
error_free_chan:
+ /*
+ * No need to remove the channel from the hash table because at this point
+ * it was not added hence the direct call and no call_rcu().
+ */
trace_ust_destroy_channel(uchan);
error:
free(defattr);
cds_lfht_for_each_entry(channel->events->ht, &iter.iter, node, node) {
ret = lttng_ht_del(channel->events, &iter);
- if (!ret) {
- destroy_event(channel->events);
- }
+ assert(!ret);
+ destroy_event(channel->events);
}
destroy_context(channel->ctx);
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
+ rcu_read_lock();
+
cds_lfht_for_each_entry(channels->ht, &iter.iter, node, node) {
ret = lttng_ht_del(channels, &iter);
if (!ret) {
}
lttng_ht_destroy(channels);
+
+ rcu_read_unlock();
}
/*