if (no_event) {
ret = kernel_add_channel_context(chan, &ctx);
if (ret < 0) {
- continue;
+ ret = LTTCOMM_KERN_CONTEXT_FAIL;
+ goto error;
}
} else {
event = get_kernel_event_by_name(cmd_ctx->lsm->u.context.event_name, chan);
if (session_list_ptr->count == 0) {
ret = LTTCOMM_NO_SESSION;
+ unlock_session_list();
goto error;
}
ret = setup_lttng_msg(cmd_ctx, sizeof(struct lttng_session) *
session_list_ptr->count);
if (ret < 0) {
+ unlock_session_list();
goto setup_error;
}