From 5c80d6e5ba6757762fd29e32c43a9e7fb710a65c Mon Sep 17 00:00:00 2001 From: ae Date: Fri, 5 Aug 2016 15:12:29 +0000 Subject: MFC r303657: Fix NULL pointer dereference. ro pointer can be NULL when IPSec consumes mbuf. PR: 211486 Approved by: re (gjb) --- sys/netinet6/ip6_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/netinet6') diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index a768f74..dc1eeb4 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1057,7 +1057,8 @@ done: * Release the route if using our private route, or if * (with flowtable) we don't have our own reference. */ - if (ro == &ip6route || ro->ro_flags & RT_NORTREF) + if (ro == &ip6route || + (ro != NULL && ro->ro_flags & RT_NORTREF)) RO_RTFREE(ro); return (error); -- cgit v1.1