[mutter] screen-cast/src: Remove follow up timeout source on disable
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen-cast/src: Remove follow up timeout source on disable
- Date: Fri, 10 Jul 2020 13:19:29 +0000 (UTC)
commit d67ba3ea65717ceab3e0c91267191c6ed2aac2c2
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Jul 10 09:06:33 2020 +0200
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
src/backends/meta-screen-cast-stream-src.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
index 74df526db2..a0ba05ea5e 100644
--- a/src/backends/meta-screen-cast-stream-src.c
+++ b/src/backends/meta-screen-cast-stream-src.c
@@ -618,6 +618,8 @@ meta_screen_cast_stream_src_disable (MetaScreenCastStreamSrc *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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]