From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Wang Nan <wangnan0@huawei.com>,
Alexei Starovoitov <ast@kernel.org>,
He Kuang <hekuang@huawei.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>, Zefan Li <lizefan@huawei.com>,
pi3orama@163.com, Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 10/13] perf tools: Free the terms list_head in parse_events__free_terms()
Date: Mon, 15 Feb 2016 18:01:40 -0300 [thread overview]
Message-ID: <1455570103-29211-11-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1455570103-29211-1-git-send-email-acme@kernel.org>
From: Wang Nan <wangnan0@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 <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 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
next prev parent reply other threads:[~2016-02-15 21:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 21:01 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 01/13] perf config: Add '--system' and '--user' options to select which config file is used Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 02/13] perf symbols: Fix symbols searching for module in buildid-cache Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 03/13] perf build: Add EXTRA_LDFLAGS option to makefile Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 04/13] perf python scripting: Append examples to err msg about audit-libs-python Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 05/13] perf tools: Add comment explaining the repsep_snprintf function Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 06/13] perf hists: Do column alignment on the format iterator Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 07/13] perf tools: Unlink entries from terms list Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 08/13] perf tools: Introduce parse_events_terms__purge() Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 09/13] perf tools: Use perf_event_terms__purge() for non-malloced terms Arnaldo Carvalho de Melo
2016-02-15 21:01 ` Arnaldo Carvalho de Melo [this message]
2016-02-15 21:01 ` [PATCH 11/13] perf tools: Rename parse_events__free_terms() to parse_events_terms__delete() Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 12/13] perf data: Fix releasing event_class Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 13/13] perf tests: Fix build on older systems where 'signal' is reserved Arnaldo Carvalho de Melo
2016-02-16 7:48 ` [GIT PULL 00/13] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455570103-29211-11-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ast@kernel.org \
--cc=hekuang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).