pf: Fix memory leak on vnet shutdown or unload
Rules are unlinked in shutdown_pf(), so we must call pf_unload_vnet_purge(), which frees unlinked rules, after that, not before. Reviewed by: eri, bz Differential Revision: https://reviews.freebsd.org/D10040
This commit is contained in:
parent
01dc206b22
commit
5c172e7059
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315469
@ -3766,12 +3766,12 @@ pf_unload_vnet(void)
|
||||
return;
|
||||
}
|
||||
|
||||
pf_unload_vnet_purge();
|
||||
|
||||
PF_RULES_WLOCK();
|
||||
shutdown_pf();
|
||||
PF_RULES_WUNLOCK();
|
||||
|
||||
pf_unload_vnet_purge();
|
||||
|
||||
pf_normalize_cleanup();
|
||||
PF_RULES_WLOCK();
|
||||
pfi_cleanup_vnet();
|
||||
|
Loading…
Reference in New Issue
Block a user