[mutter/fix-leak-monitors] MetaLogicalMonitor: free the monitors list on finalize



commit f8cf6d081543cb851373acc5081c44c343197cdc
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 2fb8b76..2b21b1a 100644
--- a/src/backends/meta-logical-monitor.c
+++ b/src/backends/meta-logical-monitor.c
@@ -253,8 +253,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]