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;
int event_element_open = 0;
struct lttng_event cur_event;
+ memset(&cur_event, 0, sizeof(cur_event));
+
/* Open domains element */
ret = mi_lttng_domains_open(writer);
if (ret) {
if (ret) {
goto end;
}
- continue;
+
+ goto next_domain;
}
switch (domains[i].type) {
goto end;
}
+next_domain:
if (lttng_opt_mi) {
/* Close domain element */
ret = mi_lttng_writer_close_element(writer);