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-Tag: v2.2.0-rc1~48 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c2a79a67ba772bb10e5df8081b4830fdab88a99c;p=lttng-tools.git 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; }