[PATCH weston] fullscreen-shell: avoid access to freed data

Quentin Glidic sardemff7+wayland at sardemff7.net
Mon Aug 15 17:36:41 UTC 2016


On 08/07/2016 10:10, Quentin Glidic wrote:
> On 08/06/2016 17:55, Arnaud Vrac wrote:
>> Remove the output transform from the view transform list when its
>> surface is destroyed. The surface destruction also triggers the
>> freeing of its views, so the next access to the output transform link
>> could crash.
>> ---
>>  fullscreen-shell/fullscreen-shell.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fullscreen-shell/fullscreen-shell.c
>> b/fullscreen-shell/fullscreen-shell.c
>> index a32e46a..035996e 100644
>> --- a/fullscreen-shell/fullscreen-shell.c
>> +++ b/fullscreen-shell/fullscreen-shell.c
>> @@ -234,6 +234,8 @@ surface_destroyed(struct wl_listener *listener,
>> void *data)
>>                             surface_destroyed);
>>      fsout->surface = NULL;
>>      fsout->view = NULL;
>> +    wl_list_remove(&fsout->transform.link);
>> +    wl_list_init(&fsout->transform.link);
>>  }
>>
>>  static void
>>
>
> Looks good:
> Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

Pushed:
319397e..e91b6e9  master -> master

Next time, please include the Signed-off-by line in your patches.

Cheers,


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list