[PATCH weston] compositor-wayland: Use the correct list pointer when freeing shm buffers

Derek Foreman derekf at osg.samsung.com
Fri May 29 14:32:52 PDT 2015


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 at osg.samsung.com>
---
 src/compositor-wayland.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 935701a..e4a1b1a 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -735,7 +735,7 @@ wayland_output_resize_surface(struct wayland_output *output)
 	}
 
 	/* 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)
-- 
2.1.4



More information about the wayland-devel mailing list