diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2007-05-19 01:40:18 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2007-05-19 01:40:18 +0000 |
commit | 9bbba41e79e65355633829f74f34f43949d33e5c (patch) | |
tree | 0143820f587e9c87a19dc2024daa0ccc78cca2c3 /sys | |
parent | d9573fb947a211a14625d5e9854fe61ab4ae50b8 (diff) | |
download | src-9bbba41e79e65355633829f74f34f43949d33e5c.tar.gz src-9bbba41e79e65355633829f74f34f43949d33e5c.zip |
Fix a mbuf leak where sc_start fails or the protocol is none.
Notes
Notes:
svn path=/head/; revision=169698
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_lagg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 52c51ccd6f02..02fed5ea971d 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1044,12 +1044,14 @@ lagg_start(struct ifnet *ifp) if (sc->sc_proto != LAGG_PROTO_NONE) error = (*sc->sc_start)(sc, m); else - m_free(m); + m_freem(m); if (error == 0) ifp->if_opackets++; - else + else { + m_freem(m); /* sc_start failed */ ifp->if_oerrors++; + } } LAGG_RUNLOCK(sc); |