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.4.0-rc3~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dd205cb023e182a7e2ca2a3a627130c1330a0e9f;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 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);