MFC r296348:

Use correct size for malloc.
This commit is contained in:
Andrey V. Elsukov 2016-03-11 09:41:46 +00:00
parent 64abae66e6
commit c4ca81897d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=296649

View File

@ -487,7 +487,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++)