softpipe: Free tgsi.image elements on context destruction.
authorJose Fonseca <jfonseca@vmware.com>
Tue, 12 Apr 2016 16:03:52 +0000 (17:03 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Apr 2016 03:21:37 +0000 (13:21 +1000)
Courtesy of address sanitizer.

[airlied: free buffers as well]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/softpipe/sp_context.c

index f66fea2d5d5c2e991bbf3be143cd1375b1932ca9..0342fc6f8cd035feccfa8d0630f5181f0f4bab36 100644 (file)
@@ -117,6 +117,8 @@ softpipe_destroy( struct pipe_context *pipe )
 
    for (i = 0; i < PIPE_SHADER_TYPES; i++) {
       FREE(softpipe->tgsi.sampler[i]);
+      FREE(softpipe->tgsi.image[i]);
+      FREE(softpipe->tgsi.buffer[i]);
    }
 
    FREE( softpipe );