softpipe: Fix leak in vbuf draw module
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 18 Jan 2010 00:04:48 +0000 (00:04 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Mon, 18 Jan 2010 00:12:42 +0000 (00:12 +0000)
src/gallium/drivers/softpipe/sp_prim_vbuf.c

index 7f573ae..5812d1e 100644 (file)
@@ -526,6 +526,7 @@ static void
 sp_vbuf_destroy(struct vbuf_render *vbr)
 {
    struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
+   align_free(cvbr->vertex_buffer);
    sp_setup_destroy_context(cvbr->setup);
    FREE(cvbr);
 }
@@ -541,7 +542,6 @@ sp_create_vbuf_backend(struct softpipe_context *sp)
 
    assert(sp->draw);
 
-
    cvbr->base.max_indices = SP_MAX_VBUF_INDEXES;
    cvbr->base.max_vertex_buffer_bytes = SP_MAX_VBUF_SIZE;