From 9b6c24e7cf665f854e692b5803db1f5af1b363d7 Mon Sep 17 00:00:00 2001 From: ae Date: Thu, 3 Mar 2016 13:07:59 +0000 Subject: [PATCH] Use correct size for malloc. Obtained from: Yandex LLC MFC after: 1 week --- sys/netpfil/ipfw/ip_fw_dynamic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index 9db59a290f71..96f38e4674de 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -505,7 +505,7 @@ resize_dynamic_table(struct ip_fw_chain *chain, int nbuckets) V_curr_dyn_buckets, nbuckets); /* Allocate and initialize new hash */ - dyn_v = malloc(nbuckets * sizeof(ipfw_dyn_rule), M_IPFW, + dyn_v = malloc(nbuckets * sizeof(*dyn_v), M_IPFW, M_WAITOK | M_ZERO); for (i = 0 ; i < nbuckets; i++)