Since "m" is not part of the "mp" chain, need to free() it.

Reported by:	Stanford Metacompilation research group
This commit is contained in:
ru 2004-01-18 14:02:53 +00:00
parent 13fe9dd8f8
commit c0ac883f96

View File

@ -1666,6 +1666,7 @@ soopt_getm(struct sockopt *sopt, struct mbuf **mp)
if (sopt_size > MLEN) {
MCLGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(*mp);
return ENOBUFS;
}