gpollfilemonitor: Fix use-after-free caused by leaking GSource

https://bugzilla.gnome.org/show_bug.cgi?id=794528
This commit is contained in:
Ting-Wei Lan 2018-03-20 21:58:20 +08:00 committed by Philip Withnall
parent e2c16df4b5
commit ba4a9538e1

View File

@ -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);
}