st/mesa: set compressed_data to NULL when freed

Reported-by: Karol Herbst <kherbst@redhat.com>
Fixes: b6db703e0f ("st/mesa: make texture views inherit compressed_data storage")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5821>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2020-07-09 16:59:39 +02:00
parent ca51f75f9d
commit 51bdaf0b60
+1
View File
@@ -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