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.
This commit is contained in:
Jonas Ådahl 2017-09-11 11:13:30 +08:00
parent 70e0fd0b45
commit 4ab47e72e5

View File

@ -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;
}