summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r--sys/netinet/ip_fw2.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 5d3e3da..999d064 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -466,10 +466,13 @@ verify_rev_path(struct in_addr src, struct ifnet *ifp)
rtalloc_ign(&ro, RTF_CLONING);
}
- if ((ro.ro_rt == NULL) || (ifp == NULL) ||
- (ro.ro_rt->rt_ifp->if_index != ifp->if_index))
+ if (ro.ro_rt == NULL)
return 0;
-
+ if ((ifp == NULL) || (ro.ro_rt->rt_ifp->if_index != ifp->if_index)) {
+ RTFREE(ro.ro_rt);
+ return 0;
+ }
+ RTFREE(ro.ro_rt);
return 1;
}
OpenPOWER on IntegriCloud