summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2018-01-11 15:49:35 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2018-01-11 15:49:35 +0000
commit02d7e6045f2a185a4090f36cf0f8ca274e154154 (patch)
tree6618235f35952170094b03ca41ed2a53209e57f3 /sys/arch/alpha
parent5d3e457eb312fff2f8ceb888863de3cdc6062e3e (diff)
Add size for free.
OK mpi@
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/dev/bus_dma.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c
index b9dd135c75c..6b2355e6730 100644
--- a/sys/arch/alpha/dev/bus_dma.c
+++ b/sys/arch/alpha/dev/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.35 2014/11/16 12:30:56 deraadt Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.36 2018/01/11 15:49:34 visa Exp $ */
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
/*-
@@ -111,8 +111,11 @@ _bus_dmamap_destroy(t, map)
bus_dma_tag_t t;
bus_dmamap_t map;
{
+ size_t mapsize;
- free(map, M_DEVBUF, 0);
+ mapsize = sizeof(struct alpha_bus_dmamap) +
+ (sizeof(bus_dma_segment_t) * (map->_dm_segcnt - 1));
+ free(map, M_DEVBUF, mapsize);
}
/*