}
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
{
- const auto rotation_id = new_state ?
- new_state->rotation.id :
- session_info->last_state_sample.rotation.id;
+ const auto& sample = new_state ? *new_state : session_info->last_state_sample;
+ const auto rotation_id = sample.rotation.id;
/* Callee acquires a reference to location. */
*evaluation = lttng_evaluation_session_rotation_completed_create(
- rotation_id, new_state->rotation.location);
+ rotation_id, sample.rotation.location);
break;
}
case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE:
client_list = notification_client_list_create(state, condition);
if (!client_list) {
ERR("Error creating notification client list for trigger %s", trigger->name);
+ ret = -1;
goto error_free_ht_element;
}
}
DBG("Removed trigger from channel_triggers_ht");
cds_list_del(&trigger_element->node);
+ free(trigger_element);
/* A trigger can only appear once per channel */
break;
}