From 1bdebe4d456c8ec8fce8aa756cdc606a994c736f Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Tue, 2 May 2000 17:09:46 +0000 Subject: [PATCH] Don't assume *lasthook is initialized in ng_path2node(). --- sys/netgraph/ng_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index c47273a6402..1c0d80edbab 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -1113,8 +1113,8 @@ ng_path2node(node_p here, const char *address, node_p *destp, char **rtnp, /* Done */ *destp = node; - if (lasthook && hook) - *lasthook = hook->peer; + if (lasthook != NULL) + *lasthook = hook ? hook->peer : NULL; return (0); }