From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jul 2020 14:59:39 +0000 (+0200) Subject: st/mesa: set compressed_data to NULL when freed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51bdaf0b601522dfc599bd352806e66ef56876a3;p=mesa.git st/mesa: set compressed_data to NULL when freed Reported-by: Karol Herbst Fixes: b6db703e0f0 ("st/mesa: make texture views inherit compressed_data storage") Reviewed-by: Karol Herbst Tested-by: Dave Airlie Part-of: --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 72274579187..b0ea844c071 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -235,6 +235,7 @@ st_FreeTextureImageBuffer(struct gl_context *ctx, pipe_reference(&stImage->compressed_data->reference, NULL)) { free(stImage->compressed_data->ptr); free(stImage->compressed_data); + stImage->compressed_data = NULL; } /* if the texture image is being deallocated, the structure of the