Plug item leak in case when NGI_FN is applied to invalid node.

Submitted by:	Roselyn Lee
MFC after:	3 days
This commit is contained in:
Gleb Smirnoff 2005-03-10 19:27:08 +00:00
parent 2647407860
commit 8bb55179ad

View File

@ -2435,6 +2435,7 @@ ng_apply_item(node_p node, item_p item)
&& (NGI_FN(item) != &ng_rmnode)) {
TRAP_ERROR();
error = EINVAL;
NG_FREE_ITEM(item);
break;
}
(*NGI_FN(item))(node, hook, NGI_ARG1(item), NGI_ARG2(item));