mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
screen-cast/src: Remove follow up timeout source on disable
We failed to remove the timeout source when disabling, meaning that if a
follow up was scheduled, and shortly after we disabled the source, the
timeout would be invoked after the source was freed causing
use-after-free bugs.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1337
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1365
(cherry picked from commit d67ba3ea65
)
This commit is contained in:
parent
0c6ac287e6
commit
1fd53c480f
@ -624,6 +624,8 @@ meta_screen_cast_stream_src_disable (MetaScreenCastStreamSrc *src)
|
|||||||
|
|
||||||
META_SCREEN_CAST_STREAM_SRC_GET_CLASS (src)->disable (src);
|
META_SCREEN_CAST_STREAM_SRC_GET_CLASS (src)->disable (src);
|
||||||
|
|
||||||
|
g_clear_handle_id (&priv->follow_up_frame_source_id, g_source_remove);
|
||||||
|
|
||||||
priv->is_enabled = FALSE;
|
priv->is_enabled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user