summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rt2661.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-09 19:26:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-09 19:26:06 +0000
commit2040ea5be85eabb015b0e64ca20892001d4fda45 (patch)
tree24e29c1b747a0596dc439885e8d29c79fe6d3f94 /sys/dev/ic/rt2661.c
parentc807ec2ba1a15aed34fa85d686db01a97e0d831a (diff)
sizes for free(); ok semarie
Diffstat (limited to 'sys/dev/ic/rt2661.c')
-rw-r--r--sys/dev/ic/rt2661.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 40a46b478df..e682a5a6bf4 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.81 2015/08/29 20:55:34 deraadt Exp $ */
+/* $OpenBSD: rt2661.c,v 1.82 2015/09/09 19:26:05 deraadt Exp $ */
/*-
* Copyright (c) 2006
@@ -561,7 +561,7 @@ rt2661_free_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF, 0);
+ free(ring->data, M_DEVBUF, ring->count * sizeof *ring->data);
}
}
@@ -712,7 +712,7 @@ rt2661_free_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF, 0);
+ free(ring->data, M_DEVBUF, ring->count * sizeof *ring->data);
}
}
@@ -753,7 +753,7 @@ rt2661_amrr_node_free(struct rt2661_softc *sc, struct rt2661_amrr_node *amn)
TAILQ_REMOVE(&sc->amn, amn, entry);
sc->amn_count--;
splx(s);
- free(amn, M_DEVBUF, 0);
+ free(amn, M_DEVBUF, sizeof *amn);
}
void