Fix: Use after free() of the rundir string
authorDavid Goulet <dgoulet@efficios.com>
Tue, 30 Oct 2012 14:39:41 +0000 (10:39 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 30 Oct 2012 14:39:41 +0000 (10:39 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index cf15ff9b02a4aec563614c699ec161f221f270ee..b4755b0b8cce0d7eba70d60d4a474345ba2bbd1c 100644 (file)
@@ -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);
This page took 0.028573 seconds and 4 git commands to generate.