[Mesa-dev] [PATCH] vl/dri3: do full teardown on screen_destroy

Leo Liu leo.liu at amd.com
Tue Sep 4 20:51:33 UTC 2018



On 09/04/2018 04:19 PM, Emil Velikov wrote:
> On 29 August 2018 at 18:14, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> From: Emil Velikov <emil.velikov at collabora.com>
>>
>> Earlier commit added support for 'front_buffers', erroneously adding a
>> return in vl_dri3_screen_destroy. Effectively leaking a lot of state.
>>
>> Fixes: 8d7ac0a4e4d ("vl/dri3: implement DRI3 BufferFromPixmap")
>> Cc: Leo Liu <leo.liu at amd.com>
>> Cc: Christian König <christian.koenig at amd.com>
>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>> ---
>> Gents, can you please double-check this. I haven't really looked at the
>> implementation, although the return seems bogus here.
>>
>> Thanks
>> ---
>>   src/gallium/auxiliary/vl/vl_winsys_dri3.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
>> index 8e3c4a0e04d..df2c9c0e50c 100644
>> --- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
>> +++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
>> @@ -712,7 +712,6 @@ vl_dri3_screen_destroy(struct vl_screen *vscreen)
>>      if (scrn->front_buffer) {
>>         dri3_free_front_buffer(scrn, scrn->front_buffer);
>>         scrn->front_buffer = NULL;
>> -      return;
>>      }
>>
>>      for (i = 0; i < BACK_BUFFER_NUM; ++i) {
> Humble ping?
Sorry. It's got overlooked.

Yes. It miss the bottom part for freeing pipe, scrn stuff. The front 
buffer and back buffer cases are  if-else cases,  so it doesn't need to 
go through the back buffer(although back buffer check NULL).

Either way:

Reviewed-by: Leo Liu <leo.liu at amd.com>

Thanks,
Leo


>
> -Emil



More information about the mesa-dev mailing list