summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_texture.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-29 09:10:05 -0600
committerBrian Paul <[email protected]>2010-04-29 09:10:05 -0600
commitba6d8448e11048687d2aa44a519c09b98fff1e94 (patch)
tree730838f874d1a167a68c66832c63d322484923ef /src/gallium/drivers/llvmpipe/lp_texture.c
parent7327a84b18140f30f2a4254066ae8ed025a8dfc0 (diff)
llvmpipe: fix texture/display target memory leak
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c5
1 files changed, 5 insertions, 0 deletions
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)) {