[Mesa-dev] [PATCH 2/2] softpipe: Free tgsi.image elements on context destruction.

Jose Fonseca jfonseca at vmware.com
Tue Apr 12 16:03:52 UTC 2016


Courtesy of address sanitizer.
---
 src/gallium/drivers/softpipe/sp_context.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index f66fea2..1d62177 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -116,6 +116,10 @@ softpipe_destroy( struct pipe_context *pipe )
    tgsi_exec_machine_destroy(softpipe->fs_machine);
 
    for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+      FREE(softpipe->tgsi.image[i]);
+   }
+
+   for (i = 0; i < PIPE_SHADER_TYPES; i++) {
       FREE(softpipe->tgsi.sampler[i]);
    }
 
-- 
2.5.0



More information about the mesa-dev mailing list