mirror of
https://github.com/opnsense/src.git
synced 2026-07-16 04:22:59 -04:00
Do not leak memory while flushing rules.
Noticed by: yar Approved by: glebius (mentor) MFC after: 1 week
This commit is contained in:
parent
f8b20fb6d6
commit
9b1858ca78
1 changed files with 3 additions and 2 deletions
|
|
@ -3957,9 +3957,10 @@ ipfw_ctl(struct sockopt *sopt)
|
|||
IPFW_WLOCK(&layer3_chain);
|
||||
layer3_chain.reap = NULL;
|
||||
free_chain(&layer3_chain, 0 /* keep default rule */);
|
||||
rule = layer3_chain.reap, layer3_chain.reap = NULL;
|
||||
rule = layer3_chain.reap;
|
||||
layer3_chain.reap = NULL;
|
||||
IPFW_WUNLOCK(&layer3_chain);
|
||||
if (layer3_chain.reap != NULL)
|
||||
if (rule != NULL)
|
||||
reap_rules(rule);
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue