From dd205cb023e182a7e2ca2a3a627130c1330a0e9f 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 6a54279f9..1d3f991aa 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -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); -- 2.34.1