From 958e15ec44ddaee9161daf04a15d93ea79c114a0 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 9 Jan 2014 10:39:19 -0500 Subject: [PATCH] Fix: missing reset when listing UST fields for multiple PIDs Fixes #627 Signed-off-by: David Goulet --- src/bin/lttng/commands/list.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.34.1