Fix: hash table allocation out of order on error
authorDavid Goulet <dgoulet@efficios.com>
Mon, 19 Mar 2012 21:16:28 +0000 (17:16 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 19 Mar 2012 21:41:44 +0000 (17:41 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index 8d0a841ed8e71cc88a2f5a7d688ecbf1e3c49d3e..8b09fc922ee48d166062439833d4f8cc9a7a6306 100644 (file)
@@ -4516,6 +4516,12 @@ int main(int argc, char **argv)
                goto error;
        }
 
+       /*
+        * Init UST app hash table. Alloc hash table before this point since
+        * cleanup() can get called after that point.
+        */
+       ust_app_ht_alloc();
+
        /* After this point, we can safely call cleanup() with "goto exit" */
 
        /*
@@ -4581,9 +4587,6 @@ int main(int argc, char **argv)
        /* Init UST command queue. */
        cds_wfq_init(&ust_cmd_queue.queue);
 
-       /* Init UST app hash table */
-       ust_app_ht_alloc();
-
        /*
         * Get session list pointer. This pointer MUST NOT be free(). This list is
         * statically declared in session.c
This page took 0.028451 seconds and 4 git commands to generate.