Plug potential mbuf leak when bridging fragments

If an error occurs when transmitting one mbuf in a chain of fragments,
free the subsequent fragments instead of leaking them.

Sponsored by:   ADARA Networks
This commit is contained in:
emaste 2012-07-10 13:17:32 +00:00
parent 9ca1308bfb
commit 83fbc9d844

View File

@ -1813,6 +1813,8 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m)
if (err == 0)
err = dst_ifp->if_transmit(dst_ifp, m);
else
m_freem(m);
}
if (err == 0) {