From: Christian Babeux Date: Thu, 28 Feb 2013 20:48:30 +0000 (-0500) Subject: Fix: Use after free on spawn_sessiond error path in check_sessiond X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=c2a79a67ba772bb10e5df8081b4830fdab88a99c Fix: Use after free on spawn_sessiond error path in check_sessiond Signed-off-by: Christian Babeux Signed-off-by: David Goulet --- 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; }