summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/busdma_machdep.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c
index bed5e8a..ea984c3 100644
--- a/sys/alpha/alpha/busdma_machdep.c
+++ b/sys/alpha/alpha/busdma_machdep.c
@@ -327,7 +327,13 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
if (map != NULL) {
if (STAILQ_FIRST(&map->bpages) != NULL)
return (EBUSY);
- free(map, M_DEVBUF);
+ /*
+ * The nobounce_dmamap map is not dynamically
+ * allocated, thus we should on no account try to
+ * free it.
+ */
+ if (map != &nobounce_dmamap)
+ free(map, M_DEVBUF);
}
dmat->map_count--;
return (0);
OpenPOWER on IntegriCloud