diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 2001-08-14 21:56:53 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 2001-08-14 21:56:53 +0000 |
| commit | ee755665c268aa5b22d7c4fd40dc02dfac64bfab (patch) | |
| tree | 82c5b095a7ca550dfe5307249b7edd4193461291 | |
| parent | 482a667634c18507857e751277e6f58f1c91052a (diff) | |
Notes
| -rw-r--r-- | sys/alpha/alpha/busdma_machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c index bed5e8a9290a..ea984c35e1a9 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); |
