summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-01 09:48:51 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-01 09:48:51 +0000
commit8376bab155e6fb1531053181fd916f3a68632fbb (patch)
tree005522ecda417f5858b7abbfd88d20b88d0e92ca /sys/dev
parent8a83d6c1545a6841aa48221a493a46258dda749c (diff)
Use the correct free(9) size for the RX ring.
ok dlg@, phessler@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_em.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 5c2d4351d67..f0dc3fa777f 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.302 2015/09/01 07:09:55 deraadt Exp $ */
+/* $OpenBSD: if_em.c,v 1.303 2015/09/01 09:48:50 mpi Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2770,7 +2770,7 @@ em_free_receive_structures(struct em_softc *sc)
}
if (sc->rx_buffer_area != NULL) {
free(sc->rx_buffer_area, M_DEVBUF,
- sc->num_tx_desc * sizeof(struct em_buffer));
+ sc->num_rx_desc * sizeof(struct em_buffer));
sc->rx_buffer_area = NULL;
}
if (sc->rxtag != NULL)