mirror of
https://github.com/brl/mutter.git
synced 2025-07-13 05:47:17 +00:00
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:
@ -949,7 +949,6 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GList *logical_monitor_configs = NULL;
|
GList *logical_monitor_configs = NULL;
|
||||||
GList *monitor_configs = NULL;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < config->n_outputs; i++)
|
for (i = 0; i < config->n_outputs; i++)
|
||||||
@ -994,8 +993,8 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_list_free_full (monitor_configs,
|
g_list_free_full (logical_monitor_configs,
|
||||||
(GDestroyNotify) meta_monitor_config_free);
|
(GDestroyNotify) meta_logical_monitor_config_free);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1008,8 +1007,8 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config,
|
|||||||
|
|
||||||
if (!monitor_config)
|
if (!monitor_config)
|
||||||
{
|
{
|
||||||
g_list_free_full (monitor_configs,
|
g_list_free_full (logical_monitor_configs,
|
||||||
(GDestroyNotify) meta_monitor_config_free);
|
(GDestroyNotify) meta_logical_monitor_config_free);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user