Fix mbuf leak.

Submitted by:	Johnny Eriksson <bygg@cafax.se>
MFC after:	5 days
This commit is contained in:
Pawel Jakub Dawidek 2004-12-27 15:53:44 +00:00
parent 6ce8940626
commit 77fc70c1ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139358

View File

@ -575,8 +575,10 @@ bpfwrite(dev, uio, ioflag)
if (error)
return (error);
if (datlen > ifp->if_mtu)
if (datlen > ifp->if_mtu) {
m_freem(m);
return (EMSGSIZE);
}
if (d->bd_hdrcmplt)
dst.sa_family = pseudo_AF_HDRCMPLT;