[Mesa-dev] [PATCH 2/2] st/shader_cache: Fix memory leak

Bartosz Tomczyk bartosz.tomczyk86 at gmail.com
Sun Apr 2 17:31:18 UTC 2017


---
 src/mesa/state_tracker/st_shader_cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index e8c7289ec6..5dbcb74f73 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -135,6 +135,8 @@ st_store_tgsi_in_disk_cache(struct st_context *st, struct gl_program *prog,
               _mesa_shader_stage_to_string(prog->info.stage), sha1_buf);
    }
 
+   if(blob->data)
+      free(blob->data);
    free(blob);
 }
 
-- 
2.12.2



More information about the mesa-dev mailing list