From: Wang Nan <wangn...@huawei.com> Fixing a leak, since code calling parse_events__free_terms() expect it to free the list_head too.
Signed-off-by: Wang Nan <wangn...@huawei.com> Acked-by: Jiri Olsa <jo...@kernel.org> Cc: Alexei Starovoitov <a...@kernel.org> Cc: He Kuang <heku...@huawei.com> Cc: Masami Hiramatsu <masami.hiramatsu...@hitachi.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Zefan Li <lize...@huawei.com> Cc: pi3or...@163.com [ Spun off from another patch ] Link: http://lkml.kernel.org/r/1454680939-24963-2-git-send-email-wangn...@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 668afdccfcca..d1b49ec7ae46 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2081,6 +2081,7 @@ void parse_events_terms__purge(struct list_head *terms) void parse_events__free_terms(struct list_head *terms) { parse_events_terms__purge(terms); + free(terms); } void parse_events_evlist_error(struct parse_events_evlist *data, -- 2.5.0