summaryrefslogtreecommitdiff
path: root/cpusched.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpusched.c')
-rw-r--r--cpusched.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpusched.c b/cpusched.c
index 2b4260b..26c0771 100644
--- a/cpusched.c
+++ b/cpusched.c
@@ -140,7 +140,8 @@ static int cleanup_cpusched_batch(void *ptr)
void init_cpusched(unsigned int cpus)
{
rwlock_init(&map_lock);
- cpu_work_map = xzmalloc((cpu_len = cpus) * sizeof(*cpu_work_map));
+ cpu_len = cpus;
+ cpu_work_map = xcalloc(cpu_len, sizeof(*cpu_work_map));
init_hash(&mapper);
}