From: Jérémie Galarneau Date: Fri, 24 Jul 2015 21:54:47 +0000 (-0400) Subject: Fix: Crash on lttng list -j/-l/-p when no events are present X-Git-Tag: v2.6.1~89 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aa2a311de34c348b41b92751b2d87f53be1d5e06;p=lttng-tools.git Fix: Crash on lttng list -j/-l/-p when no events are present The lttng client will free an uninitialized pointer whenever a the lttng list command is invoked on a domain which involves the log4j, JUL or Python agents. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index dba08bea1..31f7bd974 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -419,7 +419,7 @@ static int list_agent_events(void) int i, size, ret = CMD_SUCCESS; struct lttng_domain domain; struct lttng_handle *handle; - struct lttng_event *event_list; + struct lttng_event *event_list = NULL; pid_t cur_pid = 0; char *cmdline = NULL; const char *agent_domain_str;