From aac6d84056b8ca406e61f3aa7152c6140787029c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 Apr 2010 15:23:03 -0600 Subject: [PATCH] llvmpipe: free vertex buffer memory in lp_setup_vbuf_destroy() --- src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index a4012754784..5d3122e8ba2 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -440,7 +440,12 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) static void lp_setup_vbuf_destroy(struct vbuf_render *vbr) { - lp_setup_destroy(lp_setup_context(vbr)); + struct lp_setup_context *setup = lp_setup_context(vbr); + if (setup->vertex_buffer) { + align_free(setup->vertex_buffer); + setup->vertex_buffer = NULL; + } + lp_setup_destroy(setup); } -- 2.30.2