Skip to content
Snippets Groups Projects
Commit d9dcc6dc authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

libweston: properly orphan wl_output resources


Remove the wl_resource in the head's resource list when we are
removing the wl_output global. We sent global removal events to clients,
the resources should become dummies until clients reap them. Reset user
data so that clients triying to use dummy objects don't hit e.g. a freed
head pointer.

This fixes a theoretical issue: if an enabled output is disabled and
then gets enabled again, mode changes and wl_surface.enter/leave would
still attempt to use the dummy objects. If a client destroyed a dummy
object, we don't have the destructor to remove it from the resource
list, and libweston would hit freed memory.

Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
v5 Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
parent 7cdbabee
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment