From 1427f9b224ad5d47a91a29db8e6687aa6d76534a Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 19 Mar 2012 17:16:28 -0400 Subject: [PATCH] Fix: hash table allocation out of order on error Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 8d0a841ed..8b09fc922 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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 -- 2.34.1