[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-fdae6373910c10e27b8ae07e11e821b183d0bba5@git.kernel.org>
Date: Thu, 31 Jan 2013 03:03:48 -0800
From: tip-bot for Thomas Jarosch <thomas.jarosch@...ra2net.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
mingo@...nel.org, thomas.jarosch@...ra2net.com, tglx@...utronix.de
Subject: [tip:perf/core] perf header: Fix memory leak for the "
Not caching a kptr_restrict'ed /proc/kallsyms" case
Commit-ID: fdae6373910c10e27b8ae07e11e821b183d0bba5
Gitweb: http://git.kernel.org/tip/fdae6373910c10e27b8ae07e11e821b183d0bba5
Author: Thomas Jarosch <thomas.jarosch@...ra2net.com>
AuthorDate: Fri, 25 Jan 2013 11:21:39 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 30 Jan 2013 10:40:18 -0300
perf header: Fix memory leak for the "Not caching a kptr_restrict'ed /proc/kallsyms" case
cppcheck reported:
[util/header.c:316]: (error) Memory leak: filename
[util/header.c:316]: (error) Memory leak: linkname
Signed-off-by: Thomas Jarosch <thomas.jarosch@...ra2net.com>
Link: http://lkml.kernel.org/r/9377388.0eFDp53iW6@storm
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/header.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index e17a8fe..7b24cf3 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -313,7 +313,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
if (is_kallsyms) {
if (symbol_conf.kptr_restrict) {
pr_debug("Not caching a kptr_restrict'ed /proc/kallsyms\n");
- return 0;
+ err = 0;
+ goto out_free;
}
realname = (char *) name;
} else
--
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