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 7f573aef3c361dd781c7c33877a3e9f89825791b..5812d1eefeb1ed278299cb0c98c09086618f27ad 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;