X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;fp=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=90a011fd9ad72a0f44efe2418d1706842e796dff;hp=e8fd3110e21c2cacb8fe8bd07c2cac5c26f6a9ee;hb=566190c494083c9a460fbcb9052b5143a14a6e56;hpb=7c1f6da21f4d46d9c834820a2b26f0634c7365a9 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index e8fd3110e..90a011fd9 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4513,16 +4513,11 @@ enum lttng_error_code synchronize_tracer_notifier_unregister( struct agent *agt = agent_find_by_event_notifier_domain( trigger_domain); - if (!agt) { - agt = agent_create(trigger_domain); - if (!agt) { - ret_code = LTTNG_ERR_NOMEM; - goto end_unlock_session_list; - } - - agent_add(agt, trigger_agents_ht_by_domain); - } - + /* + * This trigger was never registered in the first place. Calling + * this function under those circumstances is an internal error. + */ + assert(agt); ret_code = trigger_agent_disable(trigger, agt); if (ret_code != LTTNG_OK) { goto end_unlock_session_list;