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 79fe635f5f
commit f6659928b2

View File

@ -204,9 +204,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