diff options
author | Zhang, Yanmin <yanmin_zhang@linux.intel.com> | 2010-03-25 19:59:01 -0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-26 08:52:59 +0100 |
commit | 5a10317483f606106395814ee2fdaa2f1256a3b3 (patch) | |
tree | 34b5258334dface9664ef24eee5ed94c6c8a165b /tools/perf/builtin-record.c | |
parent | 5aab621b7bf024608f0c089e21656e7fe875a150 (diff) | |
download | op-kernel-dev-5a10317483f606106395814ee2fdaa2f1256a3b3.zip op-kernel-dev-5a10317483f606106395814ee2fdaa2f1256a3b3.tar.gz |
perf record: Zero out mmap_array to fix segfault
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1269557941-15617-6-git-send-email-acme@infradead.org>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index bb5b23d..60ecdd3 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -751,7 +751,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used) for (i = 0; i < MAX_NR_CPUS; i++) { for (j = 0; j < MAX_COUNTERS; j++) { fd[i][j] = malloc(sizeof(int)*thread_num); - mmap_array[i][j] = malloc( + mmap_array[i][j] = zalloc( sizeof(struct mmap_data)*thread_num); if (!fd[i][j] || !mmap_array[i][j]) return -ENOMEM; |