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>
Thu, 30 Jul 2015 16:54:20 +0000 (12:54 -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 45a3045ddfe57f57faea2973e46021fc7e34a68c..7349d09f0e7edd9dbfad5e082e89a0825f440a26 100644 (file)
@@ -1009,6 +1009,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 91dd047e763d76968044cc5e038f93215d539a7f..2582e886d1e1a5f5352a6f91b8bd82b2ea914c7b 100644 (file)
@@ -5298,6 +5298,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.027529 seconds and 4 git commands to generate.