aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/netgraph.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index 313eac86b59b..fdf78c9d7556 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -962,17 +962,13 @@ _ngi_hook(item_p item, char *file, int line)
ng_ID_t _dest = NGI_RETADDR(item); \
NGI_RETADDR(item) = 0; \
NGI_MSG(item) = resp; \
- if ((ng_address_ID((here), (item), \
+ if ((error = ng_address_ID((here), (item), \
_dest, 0)) == 0) { \
SAVE_LINE(item); \
(error) = ng_snd_item((item), NG_QUEUE);\
- } else { \
- NG_FREE_ITEM(item); \
- (error) = EINVAL; \
} \
- } else { \
+ } else \
NG_FREE_ITEM(item); \
- } \
(item) = NULL; \
} while (0)