From: Namhyung Kim <namhyung@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] perf kmem: Fix a memory leak
Date: Sun, 8 Jan 2012 02:25:29 +0900 [thread overview]
Message-ID: <1325957132-10600-5-git-send-email-namhyung@gmail.com> (raw)
In-Reply-To: <1325957132-10600-1-git-send-email-namhyung@gmail.com>
The 'str' should be freed when sort_dimension__add()
failed too.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
tools/perf/builtin-kmem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 7a9b5c55ad5a..39104c0beea3 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -647,6 +647,7 @@ static int setup_sorting(struct list_head *sort_list, const char *arg)
break;
if (sort_dimension__add(tok, sort_list) < 0) {
error("Unknown --sort key: '%s'", tok);
+ free(str);
return -1;
}
}
--
1.7.6
next prev parent reply other threads:[~2012-01-07 17:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-07 17:25 [PATCH 1/8] perf script: Add missing closedir() calls Namhyung Kim
2012-01-07 17:25 ` [PATCH 2/8] perf test: Change type of '-v' option to INCR Namhyung Kim
2012-01-09 7:23 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 3/8] perf top: Add error message for EMFILE Namhyung Kim
2012-01-09 7:24 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 4/8] perf kmem: Add missing closedir() calls Namhyung Kim
2012-01-09 7:25 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` Namhyung Kim [this message]
2012-01-09 7:26 ` [tip:perf/core] perf kmem: Fix a memory leak tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 6/8] perf annotate: Fix usage string Namhyung Kim
2012-01-09 7:26 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 7/8] perf annotate: Get rid of field_sep check Namhyung Kim
2012-01-09 7:27 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 8/8] perf report: Fix --stdio output alignment when --showcpuutilization used Namhyung Kim
2012-01-09 7:28 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-09 7:23 ` [tip:perf/core] perf script: Add missing closedir() calls tip-bot for Namhyung Kim
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=1325957132-10600-5-git-send-email-namhyung@gmail.com \
--to=namhyung@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/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).