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 15:59:16 +0000 (11:59 -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 1c46bec4e196eeac359c891e8245b38c58d9f2f7..e89adbb10941324c8eea3dc920a3a91e954ce894 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.02845 seconds and 4 git commands to generate.