The hash table iteration uses an iterator that needs to stay valid for
the next loop. Using that same iterator variable in a nested lookup
in a different hash table leads to segmentation fault.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
channels_ht_node) {
struct lttng_trigger_list_element *trigger_list_element;
struct lttng_channel_trigger_list *trigger_list;
+ struct cds_lfht_iter lookup_iter;
if (!trigger_applies_to_channel(trigger, channel)) {
continue;
hash_channel_key(&channel->key),
match_channel_trigger_list,
&channel->key,
- &iter);
- node = cds_lfht_iter_get_node(&iter);
+ &lookup_iter);
+ node = cds_lfht_iter_get_node(&lookup_iter);
assert(node);
trigger_list = caa_container_of(node,
struct lttng_channel_trigger_list,