When ip6_fw_ctl() or soopt_mcopyout() return without success,

don't free mbuf.  It is already freed by these routins.

PR:		kern/24248
This commit is contained in:
Hajimu UMEMOTO 2001-01-20 22:37:24 +00:00
parent b112c02bc6
commit 6c0bea350e

View File

@ -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;