Fix: Crash on lttng list -j/-l/-p when no events are present
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 24 Jul 2015 21:54:47 +0000 (17:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 3 Aug 2015 16:06:24 +0000 (12:06 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/list.c

index dba08bea16fd8080a76970f284bb712a99a27efa..31f7bd97479cf7cbf559bbc961c841c9f0605897 100644 (file)
@@ -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;
This page took 0.026632 seconds and 4 git commands to generate.