From c2a79a67ba772bb10e5df8081b4830fdab88a99c Mon Sep 17 00:00:00 2001 From: Christian Babeux Date: Thu, 28 Feb 2013 15:48:30 -0500 Subject: [PATCH] Fix: Use after free on spawn_sessiond error path in check_sessiond Signed-off-by: Christian Babeux Signed-off-by: David Goulet --- src/bin/lttng/lttng.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 85621444c..be673f94f 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -374,13 +374,12 @@ static int check_sessiond(void) } ret = spawn_sessiond(pathname); - free(alloc_pathname); if (ret < 0) { ERR("Problem occurred when starting %s", pathname); - goto end; } - } + free(alloc_pathname); + } end: return ret; } -- 2.34.1