projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Unhandled domain option condition in list_agent_events
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
list.c
diff --git
a/src/bin/lttng/commands/list.c
b/src/bin/lttng/commands/list.c
index 108f76065f907ad8b2dc9606b45b3d28dfdf2369..cc776dd427dcc5e30bce41d430f26c1a6ac77fcd 100644
(file)
--- 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;
{
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;
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;
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);
}
agent_domain_str = get_domain_str(domain.type);
This page took
0.02353 seconds
and
4
git commands to generate.