[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-1b22859d4320d472a7a51ff4a43f62b0578469de@git.kernel.org>
Date: Sun, 8 Jan 2012 23:26:09 -0800
From: tip-bot for Namhyung Kim <namhyung@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
namhyung@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf kmem: Fix a memory leak
Commit-ID: 1b22859d4320d472a7a51ff4a43f62b0578469de
Gitweb: http://git.kernel.org/tip/1b22859d4320d472a7a51ff4a43f62b0578469de
Author: Namhyung Kim <namhyung@...il.com>
AuthorDate: Sun, 8 Jan 2012 02:25:29 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sun, 8 Jan 2012 13:27:54 -0200
perf kmem: Fix a memory leak
The 'str' should be freed when sort_dimension__add() failed too.
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1325957132-10600-5-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim <namhyung@...il.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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 7a9b5c5..39104c0 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;
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists