Use correct size for malloc.

Obtained from:	Yandex LLC
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2016-03-03 13:07:59 +00:00
parent 510ebed7be
commit 657592fd65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296348

View File

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