Mesa (master): llvmpipe: fix texture/display target memory leak
Brian Paul
brianp at kemper.freedesktop.org
Thu Apr 29 15:10:14 UTC 2010
Module: Mesa
Branch: master
Commit: ba6d8448e11048687d2aa44a519c09b98fff1e94
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba6d8448e11048687d2aa44a519c09b98fff1e94
Author: Brian Paul <brianp at vmware.com>
Date: Thu Apr 29 09:10:05 2010 -0600
llvmpipe: fix texture/display target memory leak
---
src/gallium/drivers/llvmpipe/lp_texture.c | 5 +++++
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 3468fbf..2f41d62 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)) {
More information about the mesa-commit
mailing list