From: Brian Paul Date: Wed, 28 Apr 2010 21:23:03 +0000 (-0600) Subject: llvmpipe: free vertex buffer memory in lp_setup_vbuf_destroy() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aac6d84056b8ca406e61f3aa7152c6140787029c;p=mesa.git llvmpipe: free vertex buffer memory in lp_setup_vbuf_destroy() --- 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); }