diff options
author | Arnaud Vrac <avrac@freebox.fr> | 2016-06-08 17:55:08 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-08-15 19:35:15 +0200 |
commit | e91b6e9c62847f4fa00be4f813da94ee050d0b94 (patch) | |
tree | 5e4672a641fe627acb5617903bc68aa4d48417f5 | |
parent | 319397e050e2b4833e10093ccefd8ad77a6ef78d (diff) |
fullscreen-shell: avoid access to freed data
Remove the output transform from the view transform list when its
surface is destroyed. The surface destruction also triggers the
freeing of its views, so the next access to the output transform link
could crash.
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r-- | fullscreen-shell/fullscreen-shell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index b9c82a89..b3083d88 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -293,6 +293,8 @@ surface_destroyed(struct wl_listener *listener, void *data) surface_destroyed); fsout->surface = NULL; fsout->view = NULL; + wl_list_remove(&fsout->transform.link); + wl_list_init(&fsout->transform.link); } static void |