diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 372e48dd574d..2dc080f13105 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1382,7 +1382,8 @@ ip_forward(struct mbuf *m, int srcrt) if (ro.ro_rt != NULL) { ia = ifatoia(ro.ro_rt->rt_ifa); ifa_ref(&ia->ia_ifa); - } + } else + ia = NULL; #ifndef IPSEC /* * 'ia' may be NULL if there is no route for this destination.