[PATCH] screen-share: Use the correct list pointer when freeing shm buffers
Bryce Harrington
bryce at osg.samsung.com
Fri Jul 10 18:52:56 PDT 2015
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);
--
1.9.1
More information about the wayland-devel
mailing list