Re: [PATCH weston] comp-wayland: use safe foreach when destroying outputs

2014-05-23 Thread Jason Ekstrand
To be honest, I don't think I looked at the other backends too much when writing the wayland backend. I guess cleaning up myself seemed like a good idea at the time. I don't think it really matters; having it in shutdown just lets backends be lazy. --Jason On Fri, May 23, 2014 at 2:03 AM, Pekka

Re: [PATCH weston] comp-wayland: use safe foreach when destroying outputs

2014-05-23 Thread Pekka Paalanen
On Fri, 23 May 2014 10:03:00 +0300 Pekka Paalanen wrote: > On Wed, 21 May 2014 09:20:02 -0700 > "U. Artie Eoff" wrote: > > > wl_list_for_each dereference's output to increment the > > next iteration of the loop. However, output is free'd > > inside the loop resulting in a dereference to free'd

Re: [PATCH weston] comp-wayland: use safe foreach when destroying outputs

2014-05-23 Thread Pekka Paalanen
On Wed, 21 May 2014 09:20:02 -0700 "U. Artie Eoff" wrote: > wl_list_for_each dereference's output to increment the > next iteration of the loop. However, output is free'd > inside the loop resulting in a dereference to free'd > memory. > > Use wl_list_for_each_safe instead, which is designed to

Re: [PATCH weston] comp-wayland: use safe foreach when destroying outputs

2014-05-21 Thread Thierry Reding
On Wed, May 21, 2014 at 09:20:02AM -0700, U. Artie Eoff wrote: > wl_list_for_each dereference's output to increment the > next iteration of the loop. However, output is free'd > inside the loop resulting in a dereference to free'd > memory. > > Use wl_list_for_each_safe instead, which is designed

[PATCH weston] comp-wayland: use safe foreach when destroying outputs

2014-05-21 Thread U. Artie Eoff
wl_list_for_each dereference's output to increment the next iteration of the loop. However, output is free'd inside the loop resulting in a dereference to free'd memory. Use wl_list_for_each_safe instead, which is designed to handle this kind of pattern. Signed-off-by: U. Artie Eoff --- src/co