[PATCH] screen-share: Use the correct list pointer when freeing shm buffers
Derek Foreman
derekf at osg.samsung.com
Mon Jul 13 09:02:07 PDT 2015
looks correct to me.
Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
On 10/07/15 08:52 PM, Bryce Harrington wrote:
> The wl_list_for_each operation on the free_buffers list should use
> free_link not link, which is a different list.
>
> Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
> src/screen-share.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/screen-share.c b/src/screen-share.c
> index 6b1b34c..10dc128 100644
> --- a/src/screen-share.c
> +++ b/src/screen-share.c
> @@ -414,7 +414,7 @@ shared_output_get_shm_buffer(struct shared_output *so)
> so->shm.height != height) {
>
> /* Destroy free buffers */
> - wl_list_for_each_safe(sb, bnext, &so->shm.free_buffers, link)
> + wl_list_for_each_safe(sb, bnext, &so->shm.free_buffers, free_link)
> ss_shm_buffer_destroy(sb);
>
> /* Orphan in-use buffers so they get destroyed */
> @@ -975,7 +975,7 @@ shared_output_destroy(struct shared_output *so)
>
> wl_list_for_each_safe(buffer, bnext, &so->shm.buffers, link)
> ss_shm_buffer_destroy(buffer);
> - wl_list_for_each_safe(buffer, bnext, &so->shm.free_buffers, link)
> + wl_list_for_each_safe(buffer, bnext, &so->shm.free_buffers, free_link)
> ss_shm_buffer_destroy(buffer);
>
> wl_display_disconnect(so->parent.display);
>
More information about the wayland-devel
mailing list