diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-02-10 15:27:07 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-02-10 15:27:07 +0000 |
commit | e0ec497e232c454e51a2a6c993835b3efdc30546 (patch) | |
tree | c7829eba61640c58832f048bf4718b5b2ef2ff31 | |
parent | 5d89db5b2802787bf94dbb38cd156318db8b2369 (diff) |
Free buffers on exit
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_screen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index b160521a8a..dbe7a38c3d 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -83,6 +83,16 @@ static drmBufMapPtr via_create_empty_buffers(void) return retval; } +static void via_free_empty_buffers( drmBufMapPtr bufs ) +{ + if (bufs && bufs->list) + FREE(bufs->list); + + if (bufs) + FREE(bufs); +} + + static GLboolean viaInitDriver(__DRIscreenPrivate *sPriv) { @@ -196,6 +206,8 @@ viaDestroyScreen(__DRIscreenPrivate *sPriv) if (gDRIPriv->agp.size) drmUnmap(viaScreen->agpLinearStart, gDRIPriv->agp.size); + via_free_empty_buffers(viaScreen->bufs); + FREE(viaScreen); sPriv->private = NULL; } |