From dae2fca70521909cfdd8d217d5e42fc6b33b05f6 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 16 Dec 2011 16:10:47 +0200 Subject: [PATCH] mesa: fix a leak in _mesa_delete_texture_image() 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 Reviewed-by: Brian Paul --- src/mesa/main/teximage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 841240c4c21..18a7b87c0d3 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); } -- 2.30.2