From: Eric Anholt Date: Wed, 21 Sep 2011 22:17:36 +0000 (-0700) Subject: intel: Fix improper freeing of texture data in TFP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d430e81c3287eba4ee84ca1639a23f92bbe22c8e;p=mesa.git intel: Fix improper freeing of texture data in TFP. 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 Acked-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 15196c0ebcc..30e1776baa9 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,