Skip to content

xwayland: Use the safe foreach list function when deleting entries

The DRM lease destroy function walks the list of DRM lease devices while destroying the entries.

To do so it's using the unsafe xorg_list_for_each_entry() function instead of the safe version, and that triggers a segfaults.

Simply use the xorg_list_for_each_entry_safe() version to avoid the issue.

Signed-off-by: Olivier Fourdan ofourdan@redhat.com
Suggested-by: Michel Dänzer mdaenzer@redhat.com
Fixes: 089e7f98 - "Xwayland: implement drm-lease-v1"
Closes: #1598 (closed)

Edited by Olivier Fourdan

Merge request reports