diff options
| author | Scott Long <scottl@FreeBSD.org> | 2006-01-14 17:22:47 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2006-01-14 17:22:47 +0000 |
| commit | 0af57729a6bcf47855614379ce3d1ab9187e04d1 (patch) | |
| tree | 08f0b7d2919b668976fe776ee445a6c6d24e8cf7 /sys | |
| parent | 34f83c52e7ffb6a49c15ec41296f8d2096692b55 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/amd64/busdma_machdep.c | 4 | ||||
| -rw-r--r-- | sys/i386/i386/busdma_machdep.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c index 199ab545df65..1d70417d7ed3 100644 --- a/sys/amd64/amd64/busdma_machdep.c +++ b/sys/amd64/amd64/busdma_machdep.c @@ -285,8 +285,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, /* Must bounce */ - if ((error = alloc_bounce_zone(newtag)) != 0) + if ((error = alloc_bounce_zone(newtag)) != 0) { + free(newtag, M_DEVBUF); return (error); + } bz = newtag->bounce_zone; if (ptoa(bz->total_bpages) < maxsize) { diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c index c4af1ddc94c7..08db5e00d9e4 100644 --- a/sys/i386/i386/busdma_machdep.c +++ b/sys/i386/i386/busdma_machdep.c @@ -28,6 +28,9 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/kdb.h> +#include <ddb/ddb.h> +#include <ddb/db_output.h> #include <sys/systm.h> #include <sys/malloc.h> #include <sys/bus.h> @@ -285,8 +288,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, /* Must bounce */ - if ((error = alloc_bounce_zone(newtag)) != 0) + if ((error = alloc_bounce_zone(newtag)) != 0) { + free(newtag, M_DEVBUF); return (error); + } bz = newtag->bounce_zone; if (ptoa(bz->total_bpages) < maxsize) { |
