[mutter/gnome-3-26] MetaLogicalMonitor: free the monitors list on finalize



commit f6659928b21428459a678536640a49a89e535688
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Oct 19 23:53:58 2017 -0500

    MetaLogicalMonitor: free the monitors list on finalize
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789227

 src/backends/meta-logical-monitor.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-logical-monitor.c b/src/backends/meta-logical-monitor.c
index 2404d23..c9408bf 100644
--- a/src/backends/meta-logical-monitor.c
+++ b/src/backends/meta-logical-monitor.c
@@ -205,8 +205,21 @@ 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
 meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
 {
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = meta_logical_monitor_finalize;
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]