Fix: missing reset when listing UST fields for multiple PIDs
authorDavid Goulet <dgoulet@efficios.com>
Thu, 9 Jan 2014 15:39:19 +0000 (10:39 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 9 Jan 2014 15:44:13 +0000 (10:44 -0500)
Fixes #627

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/list.c

index 6a54279f912fa9984d7419a06fbe64c6f64fabaf..1d3f991aab29efe245ec8282e050accb075920ce 100644 (file)
@@ -475,6 +475,8 @@ static int list_ust_event_fields(void)
                        cmdline = get_cmdline_by_pid(cur_pid);
                        MSG("\nPID: %d - Name: %s", cur_pid, cmdline);
                        free(cmdline);
+                       /* Wipe current event since we are about to print a new PID. */
+                       memset(&cur_event, 0, sizeof(cur_event));
                }
                if (strcmp(cur_event.name, event_field_list[i].event.name) != 0) {
                        print_events(&event_field_list[i].event);
This page took 0.027517 seconds and 4 git commands to generate.