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

Roland Scheidegger sroland at vmware.com
Tue Apr 12 16:56:30 UTC 2016


Am 12.04.2016 um 18:03 schrieb Jose Fonseca:
> 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]);
>     }
>  
> 

Looks good to me. I suppose though  the just added softpipe->tgsi.buffer
would have the same problem?

Reviewed-by: Roland Scheidegger <sroland at vmware.com>


More information about the mesa-dev mailing list