From 8e135edc9d3d2a4c456490bd361e6b040dccb0c3 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 11 Jan 2001 23:05:34 +0000 Subject: remove debug sysctl slight tweek to hook removal. (or is that tweak?) --- sys/netgraph/ng_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/netgraph/ng_base.c') diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index cdf45e7..8c3f612 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -1073,9 +1073,10 @@ ng_destroy_hook(hook_p hook) peer->hk_peer = &ng_deadhook; /* They no longer know us */ hook->hk_peer = &ng_deadhook; /* Nor us, them */ ng_rmhook_self(peer); /* Give it a surprise */ + NG_HOOK_UNREF(peer); /* account for peer link */ + NG_HOOK_UNREF(hook); /* account for peer link */ } ng_disconnect_hook(hook); - NG_HOOK_UNREF(hook); /* account for peer link */ } /* @@ -3055,6 +3056,7 @@ ng_dumphooks(void) } } +#if 0 static int sysctl_debug_ng_dump_items(SYSCTL_HANDLER_ARGS) { @@ -3076,6 +3078,7 @@ sysctl_debug_ng_dump_items(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_debug, OID_AUTO, ng_dump_items, CTLTYPE_INT | CTLFLAG_RD, 0, 0, sysctl_debug_ng_dump_items, "I", "Number of allocated items"); +#endif #endif /* NETGRAPH_DEBUG */ -- cgit v1.1