[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a8adfceb389a0045e06af22517fa3326797b160a@git.kernel.org>
Date: Mon, 15 Feb 2016 23:53:53 -0800
From: tip-bot for Wang Nan <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: masami.hiramatsu.pt@...achi.com, ast@...nel.org, hpa@...or.com,
tglx@...utronix.de, jolsa@...nel.org, lizefan@...wei.com,
mingo@...nel.org, hekuang@...wei.com, acme@...hat.com,
wangnan0@...wei.com, namhyung@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf tools: Unlink entries from terms list
Commit-ID: a8adfceb389a0045e06af22517fa3326797b160a
Gitweb: http://git.kernel.org/tip/a8adfceb389a0045e06af22517fa3326797b160a
Author: Wang Nan <wangnan0@...wei.com>
AuthorDate: Fri, 12 Feb 2016 16:31:23 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 12 Feb 2016 16:51:15 -0300
perf tools: Unlink entries from terms list
We were just freeing them, better unlink and init its nodes to catch
bugs faster if we keep dangling references to them.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Alexei Starovoitov <ast@...nel.org>
Cc: He Kuang <hekuang@...wei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
[ Spun off from another patch, use list_del_init() instead of list_del() ]
Link: http://lkml.kernel.org/r/1454680939-24963-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/parse-events.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 813d9b2..133c8d2 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -2072,8 +2072,10 @@ void parse_events__free_terms(struct list_head *terms)
{
struct parse_events_term *term, *h;
- list_for_each_entry_safe(term, h, terms, list)
+ list_for_each_entry_safe(term, h, terms, list) {
+ list_del_init(&term->list);
free(term);
+ }
}
void parse_events_evlist_error(struct parse_events_evlist *data,
Powered by blists - more mailing lists