diff options
-rw-r--r-- | sys/netgraph/ng_bpf.c | 4 | ||||
-rw-r--r-- | sys/netgraph/ng_sample.c | 3 |
2 files changed, 3 insertions, 4 deletions
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; } |