compositor-wayland: 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.
This fixes a crash when entering fullscreen mode when using the pixman
renderer on the wayland back-end.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 35f1de0..ddad3b1 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -740,7 +740,7 @@
}
/* Throw away any remaining SHM buffers */
- wl_list_for_each_safe(buffer, next, &output->shm.free_buffers, link)
+ wl_list_for_each_safe(buffer, next, &output->shm.free_buffers, free_link)
wayland_shm_buffer_destroy(buffer);
/* These will get thrown away when they get released */
wl_list_for_each(buffer, &output->shm.buffers, link)