Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335105
| From | tip-bot for Wang Nan <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf tools: Free the terms list_head in parse_events__free_terms() |
| Date | 2016-02-16 09:00 +0100 |
| Message-ID | <r2IIa-4OP-3@gated-at.bofh.it> (permalink) |
| References | <qYPyy-1p9-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: d20a5f2b277b2f46548fb60f2bb95ad9a601d3fe
Gitweb: http://git.kernel.org/tip/d20a5f2b277b2f46548fb60f2bb95ad9a601d3fe
Author: Wang Nan <wangnan0@huawei.com>
AuthorDate: Fri, 12 Feb 2016 17:01:17 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 12 Feb 2016 17:01:17 -0300
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>
---
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 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,
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[tip:perf/core] perf tools: Free the terms list_head in parse_events__free_terms() tip-bot for Wang Nan <tipbot@zytor.com> - 2016-02-16 09:00 +0100
csiph-web