mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 15:48:05 +02:00
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
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue