svn commit: r336219 - head/sys/netpfil/ipfw
Andrey V. Elsukov
ae at FreeBSD.org
Thu Jul 12 11:38:19 UTC 2018
Author: ae
Date: Thu Jul 12 11:38:18 2018
New Revision: 336219
URL: https://svnweb.freebsd.org/changeset/base/336219
Log:
Use correct size when we are allocating array for skipto index.
Also, there is no need to use M_ZERO for idxmap_back. It will be
re-filled just after allocation in update_skipto_cache().
PR: 229665
MFC after: 1 week
Modified:
head/sys/netpfil/ipfw/ip_fw_sockopt.c
Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Jul 12 05:37:52 2018 (r336218)
+++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Jul 12 11:38:18 2018 (r336219)
@@ -301,10 +301,8 @@ ipfw_init_skipto_cache(struct ip_fw_chain *chain)
{
int *idxmap, *idxmap_back;
- idxmap = malloc(65536 * sizeof(uint32_t *), M_IPFW,
- M_WAITOK | M_ZERO);
- idxmap_back = malloc(65536 * sizeof(uint32_t *), M_IPFW,
- M_WAITOK | M_ZERO);
+ idxmap = malloc(65536 * sizeof(int), M_IPFW, M_WAITOK | M_ZERO);
+ idxmap_back = malloc(65536 * sizeof(int), M_IPFW, M_WAITOK);
/*
* Note we may be called at any time after initialization,
More information about the svn-src-all
mailing list