Module: Mesa
Branch: master
Commit: 51bdaf0b601522dfc599bd352806e66ef56876a3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=51bdaf0b601522dfc599bd352806e66ef56876a3

Author: Pierre-Eric Pelloux-Prayer <[email protected]>
Date:   Thu Jul  9 16:59:39 2020 +0200

st/mesa: set compressed_data to NULL when freed

Reported-by: Karol Herbst <[email protected]>
Fixes: b6db703e0f0 ("st/mesa: make texture views inherit compressed_data 
storage")
Reviewed-by: Karol Herbst <[email protected]>
Tested-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5821>

---

 src/mesa/state_tracker/st_cb_texture.c | 1 +
 1 file changed, 1 insertion(+)

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

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to