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

2016-11-24 Thread Dima Ryazanov
Oh damn, I was looking for an API to cancel a callback and couldn't find anything; didn't realize all I needed to do is destroy it. That makes it so much simpler. I'll send out a follow-up patch. Thanks! On Thu, Nov 24, 2016 at 4:05 AM, Daniel Stone wrote: > Hi Dima, > > On 24 November 2016 at

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

2016-11-24 Thread Daniel Stone
Hi Dima, On 24 November 2016 at 06:07, 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] compositor-wayland: Fix a use after free

2016-11-23 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 output from an idle handler (same as compositor-x11), and also s