MetaLogicalMonitor: free the monitors list on finalize

https://bugzilla.gnome.org/show_bug.cgi?id=789227
This commit is contained in:
Marco Trevisan (Treviño) 2017-10-19 23:53:58 -05:00
parent cc772ddd61
commit fa37496ffb

View File

@ -252,9 +252,22 @@ meta_logical_monitor_init (MetaLogicalMonitor *logical_monitor)
{ {
} }
static void
meta_logical_monitor_finalize (GObject *object)
{
MetaLogicalMonitor *logical_monitor = META_LOGICAL_MONITOR (object);
g_list_free (logical_monitor->monitors);
G_OBJECT_CLASS (meta_logical_monitor_parent_class)->finalize (object);
}
static void static void
meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass) meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_logical_monitor_finalize;
} }
gboolean gboolean