summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2016-02-12 17:01:17 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-12 17:01:17 -0300
commitd20a5f2b277b2f46548fb60f2bb95ad9a601d3fe (patch)
tree141539c9f6ead8282571b298ef54919236e92154 /tools/perf/util/parse-events.c
parent682dc24c2a0f13d5a16ac8f4303671eb8f11519f (diff)
downloadop-kernel-dev-d20a5f2b277b2f46548fb60f2bb95ad9a601d3fe.zip
op-kernel-dev-d20a5f2b277b2f46548fb60f2bb95ad9a601d3fe.tar.gz
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 <wangnan0@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: He Kuang <hekuang@huawei.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> 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 <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 668afdc..d1b49ec 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,
OpenPOWER on IntegriCloud