diff options
Diffstat (limited to 'sys/netgraph/ng_base.c')
| -rw-r--r-- | sys/netgraph/ng_base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index f50f5f2306cf..0616176570d0 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -2139,6 +2139,13 @@ ng_snd_item(item_p item, int queue) * the node is derivable from the hook. * References are held on both by the item. */ + + /* Protect nodes from sending NULL pointers + * to each other + */ + if (m == NULL) + return (EINVAL); + CHECK_DATA_MBUF(NGI_M(item)); if (hook == NULL) { NG_FREE_ITEM(item); |
