aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_pmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_pmc.c')
-rw-r--r--sys/kern/kern_pmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c
index 52332a6d0ce3..1694294f9e39 100644
--- a/sys/kern/kern_pmc.c
+++ b/sys/kern/kern_pmc.c
@@ -338,8 +338,7 @@ init_hwpmc(void *dummy __unused)
"range.\n", pmc_softevents);
pmc_softevents = PMC_EV_DYN_COUNT;
}
- pmc_softs = mallocarray(pmc_softevents, sizeof(struct pmc_soft *),
- M_PMCHOOKS, M_NOWAIT|M_ZERO);
+ pmc_softs = malloc(pmc_softevents * sizeof(struct pmc_soft *), M_PMCHOOKS, M_NOWAIT|M_ZERO);
KASSERT(pmc_softs != NULL, ("cannot allocate soft events table"));
}