From e8b11bb2ef203a9c1e215689e011a8f46a73a331 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 29 Aug 2005 13:47:08 +0000 Subject: [PATCH] Plug item leak in case when not all hooks are connected. Found by: David Vos --- sys/netgraph/ng_split.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netgraph/ng_split.c b/sys/netgraph/ng_split.c index df85fe535b92..b7168f4224f2 100644 --- a/sys/netgraph/ng_split.c +++ b/sys/netgraph/ng_split.c @@ -142,6 +142,9 @@ ng_split_rcvdata(hook_p hook, item_p item) NG_FWD_ITEM_HOOK(error, item, priv->out); } + if (item) + NG_FREE_ITEM(item); + return (error); }