[PATCH weston 2/2] screen-share: Use wl_list_for_each_safe on destroy
Pekka Paalanen
ppaalanen at gmail.com
Mon Feb 20 12:06:24 UTC 2017
On Thu, 16 Feb 2017 19:59:51 +0000
Daniel Stone <daniels at collabora.com> wrote:
> Destroying the shared seat removes the link from so->seat_list.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> compositor/screen-share.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/compositor/screen-share.c b/compositor/screen-share.c
> index 069da1d..a6f82b1 100644
> --- a/compositor/screen-share.c
> +++ b/compositor/screen-share.c
> @@ -884,7 +884,7 @@ shared_output_create(struct weston_output *output, int parent_fd)
> {
> struct shared_output *so;
> struct wl_event_loop *loop;
> - struct ss_seat *seat;
> + struct ss_seat *seat, *tmp;
> int epoll_fd;
>
> so = zalloc(sizeof *so);
> @@ -972,7 +972,7 @@ shared_output_create(struct weston_output *output, int parent_fd)
> return so;
>
> err_display:
> - wl_list_for_each(seat, &so->seat_list, link)
> + wl_list_for_each_safe(seat, tmp, &so->seat_list, link)
> ss_seat_destroy(seat);
> wl_display_disconnect(so->parent.display);
> err_alloc:
Both patches:
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
And also look fine to land for the release, IMO.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170220/a9727b33/attachment.sig>
More information about the wayland-devel
mailing list