[Mesa-dev] [PATCH] mesa: fix a leak in _mesa_delete_texture_image()
Pekka Paalanen
ppaalanen at gmail.com
Fri Dec 16 06:17:53 PST 2011
Valgrind complains about a definitely lost block allocated in
intelNewTextureImage(). This leak was apparently created by
6e0f9001fe3fb191c2928bd09aa9e9d05ddf4ea9, "mesa: move
gl_texture_image::Data, RowStride, ImageOffsets to swrast", as it
removes the free() from _mesa_delete_texture_image().
Put the free() back, fixes a Valgrind error.
Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
Cc: Brian Paul <brianp at vmware.com>
---
src/mesa/main/teximage.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8a002b6..6318cb1 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -604,6 +604,7 @@ _mesa_delete_texture_image(struct gl_context *ctx,
*/
ASSERT(ctx->Driver.FreeTextureImageBuffer);
ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
+ free(texImage);
}
--
1.7.3.4
More information about the mesa-dev
mailing list