diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-17 18:41:33 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-17 18:41:33 +0000 |
commit | c08507e1938fc34b95315ffde083468e6ab0585d (patch) | |
tree | 0b54e159d53f2ffb78ebd762a7cd336c51f812f2 /sys | |
parent | 01ab9635b8a1f49e9d951f2219c57ac497b9b602 (diff) |
Don't leak the dmamap on freeing memory.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/agp_i810.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index e27b9726607..2cb6c37e470 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_i810.c,v 1.45 2009/01/03 13:07:15 kevlo Exp $ */ +/* $OpenBSD: agp_i810.c,v 1.46 2009/02/17 18:41:32 oga Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -653,6 +653,8 @@ agp_i810_free_memory(void *softc, struct agp_memory *mem) agp_free_dmamem(sc->sc_dmat, mem->am_size, mem->am_dmamap, mem->am_virtual, mem->am_dmaseg, mem->am_nseg); free(mem->am_dmaseg, M_AGP); + } else if (mem->am_type != 1) { + bus_dmamap_destroy(sc->sc_dmat, mem->am_dmamap); } sc->sc_allocated -= mem->am_size; |