From: David Goulet Date: Thu, 9 Jan 2014 15:39:19 +0000 (-0500) Subject: Fix: missing reset when listing UST fields for multiple PIDs X-Git-Tag: v2.3.2~17 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=958e15ec44ddaee9161daf04a15d93ea79c114a0;p=lttng-tools.git Fix: missing reset when listing UST fields for multiple PIDs Fixes #627 Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 1c7085dd7..fc618a5bb 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -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);