1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

The hashmask returned by hashinit() is a valid index in the returned hash array.

Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.

MFC after:	3 days
This commit is contained in:
Lawrence Stewart 2013-03-07 04:42:20 +00:00
parent 9a2bff7ca6
commit 1e0e83d760
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247906

View File

@ -1314,7 +1314,7 @@ siftr_manage_ops(uint8_t action)
* flow seen and freeing any malloc'd memory.
* The hash consists of an array of LISTs (man 3 queue).
*/
for (i = 0; i < siftr_hashmask; i++) {
for (i = 0; i <= siftr_hashmask; i++) {
LIST_FOREACH_SAFE(counter, counter_hash + i, nodes,
tmp_counter) {
key = counter->key;