From: Wang Nan Date: Fri, 12 Feb 2016 20:01:17 +0000 (-0300) Subject: perf tools: Free the terms list_head in parse_events__free_terms() X-Git-Tag: MMI-PSA29.97-13-9~8372^2~66^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d20a5f2b277b2f46548fb60f2bb95ad9a601d3fe;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf tools: Free the terms list_head in parse_events__free_terms() Fixing a leak, since code calling parse_events__free_terms() expect it to free the list_head too. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Cc: Alexei Starovoitov Cc: He Kuang Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com [ Spun off from another patch ] Link: http://lkml.kernel.org/r/1454680939-24963-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- 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,