diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 05d96e753641..2da084bb700e 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -564,10 +564,8 @@ ip6_forward(struct mbuf *m, int srcrt) odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); - if (error != 0) - goto senderr; - if (m == NULL) - goto freecopy; + if (error != 0 || m == NULL) + goto freecopy; /* consumed by filter */ ip6 = mtod(m, struct ip6_hdr *); /* See if destination IP address was changed by packet filter. */