From f6659928b21428459a678536640a49a89e535688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 19 Oct 2017 23:53:58 -0500 Subject: [PATCH] MetaLogicalMonitor: free the monitors list on finalize https://bugzilla.gnome.org/show_bug.cgi?id=789227 --- src/backends/meta-logical-monitor.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/backends/meta-logical-monitor.c b/src/backends/meta-logical-monitor.c index 2404d23cc..c9408bf72 100644 --- a/src/backends/meta-logical-monitor.c +++ b/src/backends/meta-logical-monitor.c @@ -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 meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meta_logical_monitor_finalize; } gboolean