diff options
author | glebius <glebius@FreeBSD.org> | 2006-10-11 14:33:08 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-10-11 14:33:08 +0000 |
commit | 119a1b5374d82eb087284be150d174c940e42c2b (patch) | |
tree | 597cfe9de7b0ad9401cf5ad8292ad08d93a1a6a5 /sys/netgraph/ng_base.c | |
parent | 6a254574821a7181ace02dae89a3302592fc3ab7 (diff) | |
download | FreeBSD-src-119a1b5374d82eb087284be150d174c940e42c2b.zip FreeBSD-src-119a1b5374d82eb087284be150d174c940e42c2b.tar.gz |
Do not leak hooks in ng_bypass().
Submitted by: Alexander Motin <mav alkar.net>
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index e1073f4..b029ab8c 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -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); |