Fix: Buggy string comparison in ust registry ht_match_event
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 43f750a820fbf7c087ca9e5df4d275b3cc065cc9..d4dae16fd43656db074bb064b2c48720710ebc7c 100644 (file)
@@ -1787,6 +1787,12 @@ static void sanitize_wait_queue(struct ust_reg_wait_queue *wait_queue)
                                wait_queue->count--;
                                ust_app_destroy(wait_node->app);
                                free(wait_node);
+                               /*
+                                * Silence warning of use-after-free in
+                                * cds_list_for_each_entry_safe which uses
+                                * __typeof__(*wait_node).
+                                */
+                               wait_node = NULL;
                                break;
                        }
                }
@@ -1989,7 +1995,7 @@ static void *thread_dispatch_ust_registration(void *data)
                                 * Don't care about return value. Let the manage apps threads
                                 * handle app unregistration upon socket close.
                                 */
-                               (void) ust_app_register_done(app->sock);
+                               (void) ust_app_register_done(app);
 
                                /*
                                 * Even if the application socket has been closed, send the app
This page took 0.024886 seconds and 5 git commands to generate.