From 4ab47e72e54cd18c2097a64c781c427a9582c346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 11 Sep 2017 11:13:30 +0800 Subject: [PATCH] monitor-config-migration: Clean up properly when deriving We cleaned up an unused monitor config list, but what we should do is clear up the logical monitor config list. This commit does that, as well as removes the unused monitor config list. --- src/backends/meta-monitor-config-migration.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/backends/meta-monitor-config-migration.c b/src/backends/meta-monitor-config-migration.c index b3f211103..b4495465e 100644 --- a/src/backends/meta-monitor-config-migration.c +++ b/src/backends/meta-monitor-config-migration.c @@ -949,7 +949,6 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config, GError **error) { GList *logical_monitor_configs = NULL; - GList *monitor_configs = NULL; unsigned int i; for (i = 0; i < config->n_outputs; i++) @@ -994,8 +993,8 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config, } else { - g_list_free_full (monitor_configs, - (GDestroyNotify) meta_monitor_config_free); + g_list_free_full (logical_monitor_configs, + (GDestroyNotify) meta_logical_monitor_config_free); return NULL; } } @@ -1008,8 +1007,8 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config, if (!monitor_config) { - g_list_free_full (monitor_configs, - (GDestroyNotify) meta_monitor_config_free); + g_list_free_full (logical_monitor_configs, + (GDestroyNotify) meta_logical_monitor_config_free); return NULL; }