Mercurial > ecos
diff packages/io/eth/current/src/net/eth_drv.c @ 182:f62680ef1804
Merge from eCos master repository on 2001-09-07-06:43:02-BST
| author | jlarmour |
|---|---|
| date | Wed, 12 Sep 2001 00:59:17 +0000 |
| parents | 2bdd82a025e1 |
| children | 022f1e506033 |
line wrap: on
line diff
--- a/packages/io/eth/current/src/net/eth_drv.c +++ b/packages/io/eth/current/src/net/eth_drv.c @@ -626,8 +626,13 @@ eth_drv_tx_done(struct eth_drv_sc *sc, C // Check for errors here (via 'status') ifp->if_opackets++; // Done with packet - mbuf_key = m0; - m_freem(m0); + + // Guard against a NULL return - can be caused by race conditions in + // the driver, this is the neatest fixup: + if (m0) { + mbuf_key = m0; + m_freem(m0); + } // Start another if possible eth_drv_send(ifp); CYGARC_HAL_RESTORE_GP();
