From c24ab624c0b03d3d3a8012d0d57692f8dec8237d Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 11 Jan 2001 15:44:41 +0000 Subject: Another brian fix, luckily not in live code. --- sys/netgraph/ng_bpf.c | 4 +--- sys/netgraph/ng_sample.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c index 5a2b84d..fb52093 100644 --- a/sys/netgraph/ng_bpf.c +++ b/sys/netgraph/ng_bpf.c @@ -361,10 +361,8 @@ ng_bpf_rcvmsg(node_p node, item_p item, hook_p lasthook) error = EINVAL; break; } - NG_RESPOND_MSG(error, node, item, resp); done: - if (item) - NG_FREE_ITEM(item); + NG_RESPOND_MSG(error, node, item, resp); NG_FREE_MSG(msg); return (error); } diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c index 5c98b83..8616dd6 100644 --- a/sys/netgraph/ng_sample.c +++ b/sys/netgraph/ng_sample.c @@ -377,9 +377,10 @@ ng_xxx_rcvdata(hook_p hook, item_p item ) } } else { /* It's the debug hook, throw it away.. */ - if (hook == xxxp->downstream_hook.hook) + if (hook == xxxp->downstream_hook.hook) { NG_FREE_ITEM(item); NG_FREE_M(m); + } } return 0; } -- cgit v1.1