[Mesa-dev] [PATCH 8/9] st/mesa: remove null check before free

Thomas Hindoe Paaboel Andersen phomes at gmail.com
Tue Apr 11 22:04:06 UTC 2017


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

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 99c59f7..73f784d 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -217,8 +217,7 @@ etc_fallback_allocate(struct st_context *st, struct st_texture_image *stImage)
    if (!st_etc_fallback(st, texImage))
       return;
 
-   if (stImage->etc_data)
-      free(stImage->etc_data);
+   free(stImage->etc_data);
 
    unsigned data_size = _mesa_format_image_size(texImage->TexFormat,
                                                 texImage->Width2,
-- 
2.9.3



More information about the mesa-dev mailing list