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:
Ed Maste 2012-07-10 13:17:32 +00:00
parent 19220a8330
commit 683fa2b5d7

View File

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