summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-11-27 04:26:15 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-11-27 04:26:15 +0000
commitd78d9cdac04ad2904e0b992dffd73750e613198b (patch)
treebaeafb647a6f2a2d5fe3ce4dbc2cbe1a45dc2ac9 /sys
parentdb96ce8c29bccdb42bf5c61f45bc234776d5c1c6 (diff)
Fix ami_freemem() by initializing segp before using it.
ok marco@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/ami.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 907fa8c0632..9384670dfcc 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.98 2005/11/26 05:49:47 marco Exp $ */
+/* $OpenBSD: ami.c,v 1.99 2005/11/27 04:26:14 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -279,7 +279,7 @@ void
ami_freemem(caddr_t p, bus_dma_tag_t dmat, bus_dmamap_t *map,
size_t isize, size_t nent, const char *iname)
{
- bus_dma_segment_t segp;
+ bus_dma_segment_t segp = (*map)->dm_segs[0];
size_t total = isize * nent;
bus_dmamap_unload(dmat, *map);