xwayland: Fix user after free on shutdown
We need to remove our listener link before we free the structure it's inside, or the signal list walk will try to dereference it. Remove the improbable NULL check at the same time. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
6c2646e967
commit
c826d8fa0d
@ -224,8 +224,7 @@ weston_xserver_destroy(struct wl_listener *l, void *data)
|
||||
struct weston_xserver *wxs =
|
||||
container_of(l, struct weston_xserver, destroy_listener);
|
||||
|
||||
if (!wxs)
|
||||
return;
|
||||
wl_list_remove(&wxs->destroy_listener.link);
|
||||
|
||||
if (wxs->loop)
|
||||
weston_xserver_shutdown(wxs);
|
||||
|
Loading…
Reference in New Issue
Block a user