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.7.0-rc2~179 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3d8d6ab0579eae00524249ad2a736cd14a5e0f88;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 108f76065..cc776dd42 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -408,7 +408,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; @@ -421,6 +421,10 @@ static int list_agent_events(void) domain.type = LTTNG_DOMAIN_LOG4J; } else if (opt_python) { domain.type = LTTNG_DOMAIN_PYTHON; + } else { + ERR("Invalid agent domain selected."); + ret = CMD_ERROR; + goto error; } agent_domain_str = get_domain_str(domain.type);