aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2004-12-27 15:53:44 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2004-12-27 15:53:44 +0000
commit77fc70c1ef77621036c7961affca175a193a4ca0 (patch)
tree61fda77246006f80de89e13f4190e95a7093942b
parent6ce8940626f36fa24f1da89c12452ee2f93fd144 (diff)
downloadsrc-77fc70c1ef77621036c7961affca175a193a4ca0.tar.gz
src-77fc70c1ef77621036c7961affca175a193a4ca0.zip
Fix mbuf leak.
Submitted by: Johnny Eriksson <bygg@cafax.se> MFC after: 5 days
Notes
Notes: svn path=/head/; revision=139358
-rw-r--r--sys/net/bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index a934adf68c4d..debed79915e7 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -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;