summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/isa
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2015-09-27 10:12:10 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2015-09-27 10:12:10 +0000
commit166a246a1e0cde4330bb300d8f19c17bda088428 (patch)
treef9456e2eeaabb2818172ff456137985341e5f5b3 /sys/arch/amd64/isa
parent966e7350f8c07b33900038be562b3476b9ef901e (diff)
free(x, 0) cleanup:
- set size argument of free() - remove pointless if expression around free() call ok guenther@
Diffstat (limited to 'sys/arch/amd64/isa')
-rw-r--r--sys/arch/amd64/isa/isa_machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/isa/isa_machdep.c b/sys/arch/amd64/isa/isa_machdep.c
index b79d5aa6b51..74dc90762e5 100644
--- a/sys/arch/amd64/isa/isa_machdep.c
+++ b/sys/arch/amd64/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.27 2015/03/14 03:38:46 jsg Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.28 2015/09/27 10:12:09 semarie Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -451,8 +451,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
out:
if (error) {
- if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF, 0);
+ free(map->_dm_cookie, M_DEVBUF, cookiesize);
_bus_dmamap_destroy(t, map);
}
return (error);