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
This commit is contained in:
parent
44314c3509
commit
0a2c13d333
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user