llvmpipe: fix mem leak in llvmpipe_resource_destroy()
authorBrian Paul <brianp@vmware.com>
Wed, 28 Apr 2010 21:21:56 +0000 (15:21 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 28 Apr 2010 21:25:50 +0000 (15:25 -0600)
src/gallium/drivers/llvmpipe/lp_texture.c

index 9d10a9f2d387c3e625b507156fcaa50a3134f887..3468fbfb1f304b041d212fc5c3502ab4354ad912 100644 (file)
@@ -241,6 +241,8 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen,
       /* display target */
       struct sw_winsys *winsys = screen->winsys;
       winsys->displaytarget_destroy(winsys, lpr->dt);
+
+      FREE(lpr->layout[0]);
    }
    else if (resource_is_texture(pt)) {
       /* regular texture */