diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-09-24 15:05:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-05 09:31:46 -0700 |
commit | 11ae63deabcf6deebb9a4ab5ed9fb93dac3339dd (patch) | |
tree | f25b1e81e0b1a3219a73d1383977ce611c737d6a /tools | |
parent | 45bc25843ee4c5c6183b6fba013fba1e11eb05b1 (diff) |
perf tools: Fix buffer allocation
commit a255a9981a8566a1efabec983b7811e937e662d2 upstream.
"perf top" cores dump on my dev machine, if run from a directory
where vmlinux is present:
*** glibc detected *** malloc(): memory corruption: 0x085670d0 ***
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4ABB6EB7.7000002@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/module.c b/tools/perf/util/module.c index ddabe925d65..702083d342f 100644 --- a/tools/perf/util/module.c +++ b/tools/perf/util/module.c @@ -422,7 +422,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self) len += strlen(uts.release); len += strlen("/modules.dep"); - path = calloc(1, len); + path = calloc(1, len + 1); if (path == NULL) goto out_failure; |