Fix: sessiond: report client list allocation failure as a fatal error
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.cpp
index 1e21fffe7bfb689525b082a1492552021f861108..43879c99fe8957d021e2dacbb2218997cd3c73d8 100644 (file)
@@ -2965,6 +2965,7 @@ int handle_notification_thread_command_register_trigger(
                        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;
                        }
                }
@@ -3278,6 +3279,7 @@ int handle_notification_thread_command_unregister_trigger(
 
                                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;
                        }
This page took 0.022748 seconds and 4 git commands to generate.