From: Brian Paul Date: Thu, 29 Apr 2010 15:10:05 +0000 (-0600) Subject: llvmpipe: fix texture/display target memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba6d8448e11048687d2aa44a519c09b98fff1e94;p=mesa.git llvmpipe: fix texture/display target memory leak --- diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 3468fbfb1f3..2f41d620c8a 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)) {