[tip:perf/core] perf tools: Fix memory leak in event_format__print function

From: tip-bot for Jiri Olsa
Date: Sat Feb 22 2014 - 12:59:40 EST


Commit-ID: b58f608e31010cb76ee953a6919f9d96b4eb58d9
Gitweb: http://git.kernel.org/tip/b58f608e31010cb76ee953a6919f9d96b4eb58d9
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Sun, 2 Feb 2014 22:38:49 +0100
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 18 Feb 2014 09:34:47 -0300

perf tools: Fix memory leak in event_format__print function

Properly destroying trace_seq object.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Link: http://lkml.kernel.org/r/1391377150-23920-2-git-send-email-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/trace-event-parse.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index e0d6d07f..c36636f 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -126,6 +126,7 @@ void event_format__print(struct event_format *event,
trace_seq_init(&s);
pevent_event_info(&s, event, &record);
trace_seq_do_printf(&s);
+ trace_seq_destroy(&s);
}

void parse_proc_kallsyms(struct pevent *pevent,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/