summaryrefslogtreecommitdiff
path: root/sys/netgraph
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2001-01-11 15:44:41 +0000
committerJulian Elischer <julian@FreeBSD.org>2001-01-11 15:44:41 +0000
commitcdbfe12417e4a8800646d9d214b2de2bc6a71ab7 (patch)
tree511a295d215821fdce2f8f059f374c1a404bab1a /sys/netgraph
parentbfbdd08421329679a3bf5128fe8128bdd5d7b8db (diff)
Notes
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_bpf.c4
-rw-r--r--sys/netgraph/ng_sample.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c
index 5a2b84dc7cc5..fb52093d0fbe 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 5c98b830b9f0..8616dd6f5ce2 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;
}