mirror of
https://github.com/opnsense/src.git
synced 2026-04-01 23:45:12 -04:00
Do not leak hooks in ng_bypass().
Submitted by: Alexander Motin <mav alkar.net>
This commit is contained in:
parent
1be947e9f8
commit
cf3254aac8
1 changed files with 3 additions and 0 deletions
|
|
@ -1129,6 +1129,9 @@ ng_bypass(hook_p hook1, hook_p hook2)
|
|||
hook1->hk_peer = &ng_deadhook;
|
||||
hook2->hk_peer = &ng_deadhook;
|
||||
|
||||
NG_HOOK_UNREF(hook1);
|
||||
NG_HOOK_UNREF(hook2);
|
||||
|
||||
/* XXX If we ever cache methods on hooks update them as well */
|
||||
ng_destroy_hook(hook1);
|
||||
ng_destroy_hook(hook2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue