summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet6/frag6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 8e80accd150..2e21e9654c3 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.33 2011/04/03 13:54:21 stsp Exp $ */
+/* $OpenBSD: frag6.c,v 1.34 2011/05/02 22:16:33 chl Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -202,8 +202,10 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
if (ro.ro_rt != NULL && ro.ro_rt->rt_ifa != NULL)
dstifp = ((struct in6_ifaddr *)ro.ro_rt->rt_ifa)->ia_ifp;
- RTFREE(ro.ro_rt);
- ro.ro_rt = NULL;
+ if (ro.ro_rt != NULL) {
+ RTFREE(ro.ro_rt);
+ ro.ro_rt = NULL;
+ }
#else
/* we are violating the spec, this is not the destination interface */
if ((m->m_flags & M_PKTHDR) != 0)