From bd69add26f7f847b1d23766ec631f8e3fde4ec7c Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 30 Oct 2012 10:39:41 -0400 Subject: [PATCH] Fix: Use after free() of the rundir string Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index cf15ff9b0..b4755b0b8 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -412,6 +412,7 @@ static void cleanup(void) ERR("Unable to clean %s", rundir); } free(cmd); + free(rundir); DBG("Cleaning up all sessions"); @@ -3985,9 +3986,6 @@ int main(int argc, char **argv) health_init(&ustconsumer64_data.health); health_poll_update(&ustconsumer64_data.health); - /* Not needed anymore. */ - free(rundir); - /* Create thread to manage the client socket */ ret = pthread_create(&health_thread, NULL, thread_manage_health, (void *) NULL); -- 2.34.1