Fix: Initialize global agent_apps_ht_by_sock on session daemon launch
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jul 2015 16:46:56 +0000 (12:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 3 Aug 2015 16:21:37 +0000 (12:21 -0400)
Reported-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent.c
src/bin/lttng-sessiond/main.c

index c50bbcabaee61d63639eb963b2f1ffa3fa8c5037..afc3712a7127007b8d06b19bcd815893fcc33e68 100644 (file)
@@ -1006,6 +1006,9 @@ void agent_app_ht_clean(void)
        struct lttng_ht_node_ulong *node;
        struct lttng_ht_iter iter;
 
+       if (!agent_apps_ht_by_sock) {
+               return;
+       }
        rcu_read_lock();
        cds_lfht_for_each_entry(agent_apps_ht_by_sock->ht, &iter.iter, node, node) {
                struct agent_app *app;
index 02d135c9ceed9bfcf3e567108725a250a0e9067b..36d154e1fff0cd5ebe46afa6b74700110c969b61 100644 (file)
@@ -5080,6 +5080,9 @@ int main(int argc, char **argv)
        void *status;
        const char *home_path, *env_app_timeout;
 
+       /* Initialize agent apps ht global variable */
+       agent_apps_ht_by_sock = NULL;
+
        init_kernel_workarounds();
 
        rcu_register_thread();
This page took 0.029032 seconds and 4 git commands to generate.