diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index bf2a5f8bb53c..33ba83830436 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,9 +202,12 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { - if (!nortfree) + if (!nortfree) { RTFREE(ro->ro_rt); + LLE_FREE(ro->ro_lle); + } ro->ro_rt = (struct rtentry *)NULL; + ro->ro_lle = (struct llentry *)NULL; } #ifdef IPFIREWALL_FORWARD if (ro->ro_rt == NULL && fwd_tag == NULL) {