Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2016 13:07:59 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296348 - head/sys/netpfil/ipfw
Message-ID:  <201603031307.u23D7xH6045371@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603031307.u23D7xH6045371>