mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-26 13:30:11 +01:00
compositor: fix crash when destroying incompletely created output
When the output can't be completely created in the backend (for example lack of memory), weston_compositor_add_output() is never run. In such a case output->link is not initialized. Letter, when weston_output_destroy() is called, application crashes on wl_list_remove(&output->link). This problem happens when drm, fbdev, rdp, rpi or wayland backend is used. v2: Initialize output->link in weston_output_init() as suggested by Derek Foreman. Signed-off-by: Dawid Gajownik <gajownik@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
58106d78bb
commit
2f7d33d984
1 changed files with 1 additions and 0 deletions
|
|
@ -4077,6 +4077,7 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
|
|||
wl_list_init(&output->animation_list);
|
||||
wl_list_init(&output->resource_list);
|
||||
wl_list_init(&output->feedback_list);
|
||||
wl_list_init(&output->link);
|
||||
|
||||
loop = wl_display_get_event_loop(c->wl_display);
|
||||
output->repaint_timer = wl_event_loop_add_timer(loop,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue