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:42 +0000 (10:44 -0500)
Fixes #627

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

index 1c7085dd7018c5b788ed23ad409f924a552066cf..fc618a5bbb82b7f458bfc8d6552c4981fa0ddcba 100644 (file)
@@ -407,6 +407,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.026448 seconds and 4 git commands to generate.