diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-05-19 01:40:18 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-05-19 01:40:18 +0000 |
commit | cbd790c8d27189110c36da6503196f44d88a5860 (patch) | |
tree | 0143820f587e9c87a19dc2024daa0ccc78cca2c3 /sys/net | |
parent | 1b488024ace00adcb211d5e856c00d9088747879 (diff) | |
download | FreeBSD-src-cbd790c8d27189110c36da6503196f44d88a5860.zip FreeBSD-src-cbd790c8d27189110c36da6503196f44d88a5860.tar.gz |
Fix a mbuf leak where sc_start fails or the protocol is none.
Diffstat (limited to 'sys/net')
-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 52c51cc..02fed5e 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); |