From 65167fc080cc312f646d145fa52c5e1269ea5907 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 24 Jul 2015 17:54:47 -0400 Subject: [PATCH] Fix: Crash on lttng list -j/-l/-p when no events are present MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng/commands/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index d7970a8b9..e2cf4df50 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -372,7 +372,7 @@ static int list_jul_events(void) int i, size; 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; -- 2.34.1