[Mesa-dev] [PATCH 2/2] softpipe: Free tgsi.image elements on context destruction.
Dave Airlie
airlied at gmail.com
Wed Apr 13 03:22:19 UTC 2016
On 13 April 2016 at 02:56, Roland Scheidegger <sroland at vmware.com> wrote:
> 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?
Oops, I pushed this fixed to handle buffers as well
Thanks,
Dave.
More information about the mesa-dev
mailing list