Only perform notification related unregistering when action is notify
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 17 Aug 2020 22:19:47 +0000 (18:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Dec 2020 17:25:37 +0000 (12:25 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id89eaf1c8f550e20adbd0b0d82462f6bf0b8ba21

src/bin/lttng-sessiond/notification-thread-events.c

index 7ba78ba312536435c5adb41737612122794bea48..a1af9c53526367018c774447837e352f2f349353 100644 (file)
@@ -2609,17 +2609,19 @@ int handle_notification_thread_command_unregister_trigger(
                }
        }
 
-       /*
-        * Remove and release the client list from
-        * notification_trigger_clients_ht.
-        */
-       client_list = get_client_list_from_condition(state, condition);
-       assert(client_list);
+       if (is_trigger_action_notify(trigger)) {
+               /*
+                * Remove and release the client list from
+                * notification_trigger_clients_ht.
+                */
+               client_list = get_client_list_from_condition(state, condition);
+               assert(client_list);
 
-       /* Put new reference and the hashtable's reference. */
-       notification_client_list_put(client_list);
-       notification_client_list_put(client_list);
-       client_list = NULL;
+               /* Put new reference and the hashtable's reference. */
+               notification_client_list_put(client_list);
+               notification_client_list_put(client_list);
+               client_list = NULL;
+       }
 
        /* Remove trigger from triggers_ht. */
        trigger_ht_element = caa_container_of(triggers_ht_node,
This page took 0.034793 seconds and 4 git commands to generate.