svn commit: r296348 - head/sys/netpfil/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Thu Mar 3 13:08:00 UTC 2016


Author: ae
Date: Thu Mar  3 13:07:59 2016
New Revision: 296348
URL: https://svnweb.freebsd.org/changeset/base/296348

Log:
  Use correct size for malloc.
  
  Obtained from:	Yandex LLC
  MFC after:	1 week

Modified:
  head/sys/netpfil/ipfw/ip_fw_dynamic.c

Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_dynamic.c	Thu Mar  3 11:46:41 2016	(r296347)
+++ head/sys/netpfil/ipfw/ip_fw_dynamic.c	Thu Mar  3 13:07:59 2016	(r296348)
@@ -505,7 +505,7 @@ resize_dynamic_table(struct ip_fw_chain 
 	    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++)


More information about the svn-src-all mailing list