Re: [PATCH weston v2] compositor-wayland: Fix a use after free

2016-11-28 Thread Dima Ryazanov
Oh, good catch; just reviewed it. Thanks! On Mon, Nov 28, 2016 at 10:20 AM, Daniel Stone wrote: > Hi Dima, > > On 24 November 2016 at 13:13, Dima Ryazanov wrote: > > When a window is being closed, the frame_done callback often runs after > > the output is already destroyed, i.e: > > > > wayla

Re: [PATCH weston v2] compositor-wayland: Fix a use after free

2016-11-28 Thread Daniel Stone
Hi Dima, On 24 November 2016 at 13:13, Dima Ryazanov wrote: > When a window is being closed, the frame_done callback often runs after > the output is already destroyed, i.e: > > wayland_output_start_repaint_loop > input_handle_button > wayland_output_destroy > frame_done > > To fix this

[PATCH weston v2] compositor-wayland: Fix a use after free

2016-11-24 Thread Dima Ryazanov
When a window is being closed, the frame_done callback often runs after the output is already destroyed, i.e: wayland_output_start_repaint_loop input_handle_button wayland_output_destroy frame_done To fix this, destroy the callback before destroying the output. (Also, fix the type of o