From ba6d8448e11048687d2aa44a519c09b98fff1e94 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 29 Apr 2010 09:10:05 -0600 Subject: llvmpipe: fix texture/display target memory leak --- src/gallium/drivers/llvmpipe/lp_texture.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 3468fbfb1f..2f41d620c8 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -242,6 +242,11 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen, struct sw_winsys *winsys = screen->winsys; winsys->displaytarget_destroy(winsys, lpr->dt); + if (lpr->tiled[0].data) { + align_free(lpr->tiled[0].data); + lpr->tiled[0].data = NULL; + } + FREE(lpr->layout[0]); } else if (resource_is_texture(pt)) { -- cgit v1.2.3