summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-01-20 22:37:24 +0000
committerume <ume@FreeBSD.org>2001-01-20 22:37:24 +0000
commit9f0480156d771aba1d107a848ac79413078d427e (patch)
tree1ec9ab2c80b7a9de58021c3f2bac326a0435aa14 /sys/netinet6
parentd9b354393fd63e21745a470162948d3673aa6ef2 (diff)
downloadFreeBSD-src-9f0480156d771aba1d107a848ac79413078d427e.zip
FreeBSD-src-9f0480156d771aba1d107a848ac79413078d427e.tar.gz
When ip6_fw_ctl() or soopt_mcopyout() return without success,
don't free mbuf. It is already freed by these routins. PR: kern/24248
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index a898cf2..88f3b4d 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1560,7 +1560,7 @@ ip6_ctloutput(so, sopt)
error = (*ip6_fw_ctl_ptr)(optname, mp);
if (error == 0)
error = soopt_mcopyout(sopt, m); /* XXX */
- if (m)
+ if (error == 0 && m)
m_freem(m);
}
break;
OpenPOWER on IntegriCloud