aboutsummaryrefslogtreecommitdiff
path: root/sys/pci/if_dc.c
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2003-07-06 14:39:45 +0000
committerMaxime Henrion <mux@FreeBSD.org>2003-07-06 14:39:45 +0000
commit3d6ae7e0476f83adfa276a6c74bba484742fe9b6 (patch)
tree67216985317f6de4fb6f76b4a80370a7576e911f /sys/pci/if_dc.c
parentb3811c95833ee547d1873a9a603f456232c2d2f3 (diff)
downloadsrc-3d6ae7e0476f83adfa276a6c74bba484742fe9b6.tar.gz
src-3d6ae7e0476f83adfa276a6c74bba484742fe9b6.zip
Fix a bug that could cause dc(4) to m_freem() an already freed
mbuf or something that isn't an mbuf. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=117282
Diffstat (limited to 'sys/pci/if_dc.c')
-rw-r--r--sys/pci/if_dc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 99826ac31287..3f479926aebc 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -3539,7 +3539,8 @@ dc_stop(struct dc_softc *sc)
*/
for (i = 0; i < DC_TX_LIST_CNT; i++) {
if (cd->dc_tx_chain[i] != NULL) {
- if (ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) {
+ if ((ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) ||
+ !(ld->dc_tx_list[i].dc_ctl & DC_TXCTL_LASTFRAG)) {
cd->dc_tx_chain[i] = NULL;
continue;
}