summaryrefslogtreecommitdiff
path: root/tools/perf/bench/sched-messaging.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/bench/sched-messaging.c')
-rw-r--r--tools/perf/bench/sched-messaging.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 93dcd9dba3d0..4fb6657fc826 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -301,7 +301,7 @@ int bench_sched_messaging(int argc, const char **argv)
argc = parse_options(argc, argv, options,
bench_sched_message_usage, 0);
- worker_tab = malloc(num_fds * 2 * num_groups * sizeof(union messaging_worker));
+ worker_tab = calloc(num_fds * 2 * num_groups, sizeof(union messaging_worker));
if (!worker_tab)
err(EXIT_FAILURE, "main:malloc()");