From: Jérémie Galarneau Date: Fri, 24 Jul 2015 22:01:02 +0000 (-0400) Subject: Fix: Unhandled domain option condition in list_agent_events X-Git-Tag: v2.6.1~88 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8db2a1398a36e70aed62a5f9c3d7142efb159d31;p=lttng-tools.git Fix: Unhandled domain option condition in list_agent_events Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 31f7bd974..3d0ce0304 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -418,7 +418,7 @@ static int list_agent_events(void) { int i, size, ret = CMD_SUCCESS; struct lttng_domain domain; - struct lttng_handle *handle; + struct lttng_handle *handle = NULL; struct lttng_event *event_list = NULL; pid_t cur_pid = 0; char *cmdline = NULL; @@ -429,6 +429,10 @@ static int list_agent_events(void) domain.type = LTTNG_DOMAIN_JUL; } else if (opt_log4j) { domain.type = LTTNG_DOMAIN_LOG4J; + } else { + ERR("Invalid agent domain selected."); + ret = CMD_ERROR; + goto error; } agent_domain_str = get_domain_str(domain.type);