Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
}
/*
- * Iterate over all stream element of the hashtable and free them. This is race
- * free since the hashtable received MUST be in a race free synchronization
- * state. It's the caller responsability to make sure of that.
+ * Iterate over all streams of the hashtable and free them properly.
*/
static void destroy_stream_ht(struct lttng_ht *ht)
{
ret = lttng_ht_del(ht, &iter);
assert(!ret);
- free(stream);
+ call_rcu(&stream->node.head, consumer_free_stream);
}
rcu_read_unlock();
consumer_del_channel(stream->chan);
}
- free(stream);
+ call_rcu(&stream->node.head, consumer_free_stream);
}
/*