Noticed when reviewing the code, so I don't have a reproducer
for the issue. However, the "ADD_TRACER_EVENT_SOURCE" command
returns LTTNG_OK even when the notification thread fails to add
the tracer event source to the poll set.
The error path properly performs the requisite clean-up, but
the command emitter will be under the impression that the command
succeeded. In doing so, it will most likely use the
"REMOVE_TRACER_EVENT_SOURCE" at a later point which will cause
a failed assertion to hit when the `source_element` isn't found.
Change-Id: I4a400d6affa21d2c2247ecfb845ca1e4aa730b5d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lttng_domain_type_str(element->domain));
cds_list_del(&element->node);
free(element);
+ cmd_result = LTTNG_ERR_UNK;
goto end;
}