aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2013-01-25 05:21:39 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-30 08:40:18 -0500
commitfdae6373910c10e27b8ae07e11e821b183d0bba5 (patch)
tree6faa0035aa4c58f2aff9eb7d6e8191292d1e01d0 /tools
parent0b9e01a4f0d1c8277da6824fe060ccb0434d2fde (diff)
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@intra2net.com> Link: http://lkml.kernel.org/r/9377388.0eFDp53iW6@storm Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/header.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index e17a8fe9c4d7..7b24cf3237d8 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,
313 if (is_kallsyms) { 313 if (is_kallsyms) {
314 if (symbol_conf.kptr_restrict) { 314 if (symbol_conf.kptr_restrict) {
315 pr_debug("Not caching a kptr_restrict'ed /proc/kallsyms\n"); 315 pr_debug("Not caching a kptr_restrict'ed /proc/kallsyms\n");
316 return 0; 316 err = 0;
317 goto out_free;
317 } 318 }
318 realname = (char *) name; 319 realname = (char *) name;
319 } else 320 } else