X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_channels.c;h=692480e816f28c2e2d808d326a8520c2a59e750d;hp=f094e12feb84f51f5e2130bfaf3d5b494a9e1e7e;hb=5853fd43129ab32dd54fff779076c67234eb73dc;hpb=2722170124d7942f34b991237874a6d6c17fc421 diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index f094e12fe..692480e81 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -303,6 +303,9 @@ int cmd_enable_channels(int argc, const char **argv) ret = enable_channel(session_name); end: + if (!opt_session_name && session_name) { + free(session_name); + } poptFreeContext(pc); return ret; }