[Mesa-dev] [PATCH 04/11] intel: Fix improper freeing of texture data in TFP.

Eric Anholt eric at anholt.net
Thu Sep 22 12:34:16 PDT 2011


If there happened to be ->Data present, we assertion failed instead of
handling it correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35234
---
 src/mesa/drivers/dri/intel/intel_tex_image.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 15196c0..30e1776 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -686,10 +686,7 @@ intel_set_texture_image_region(struct gl_context *ctx,
 			      region->width, region->height, 1,
 			      0, internalFormat, format);
 
-   if (intel_image->mt) {
-      intel_miptree_release(intel, &intel_image->mt);
-      assert(!image->Data);
-   }
+   ctx->Driver.FreeTextureImageBuffer(ctx, image);
 
    intel_image->mt = intel_miptree_create_for_region(intel, target,
 						     image->TexFormat,
-- 
1.7.5.4



More information about the mesa-dev mailing list