[glib/glib-2-56] gpollfilemonitor: Fix use-after-free caused by leaking GSource
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-56] gpollfilemonitor: Fix use-after-free caused by leaking GSource
- Date: Mon, 26 Mar 2018 09:59:30 +0000 (UTC)
commit 5ef27d0e2672b606419a1253e2f7a86904412cd0
Author: Ting-Wei Lan <lantw src gnome org>
Date: Tue Mar 20 21:58:20 2018 +0800
gpollfilemonitor: Fix use-after-free caused by leaking GSource
https://bugzilla.gnome.org/show_bug.cgi?id=794528
gio/gpollfilemonitor.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gio/gpollfilemonitor.c b/gio/gpollfilemonitor.c
index 411e00393..bd3d78a02 100644
--- a/gio/gpollfilemonitor.c
+++ b/gio/gpollfilemonitor.c
@@ -50,7 +50,9 @@ g_poll_file_monitor_finalize (GObject* object)
poll_monitor = G_POLL_FILE_MONITOR (object);
+ g_poll_file_monitor_cancel (G_FILE_MONITOR (poll_monitor));
g_object_unref (poll_monitor->file);
+ g_clear_object (&poll_monitor->last_info);
G_OBJECT_CLASS (g_poll_file_monitor_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]