screen-share: Use the correct list pointer when freeing shm buffers

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@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
dev
Bryce Harrington 9 years ago
parent 2f2a70cc85
commit 29f09fe876
  1. 4
      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);

Loading…
Cancel
Save