mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Remove extra checks before call of g_strfreev().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
1ceb2494e4
commit
ac8e519854
@ -130,9 +130,7 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const
|
||||
mc_skin_color_t *mc_skin_color, *tmp;
|
||||
|
||||
values = mc_config_get_string_list (mc_skin->config, group, key, &items_count);
|
||||
if (values == NULL)
|
||||
return NULL;
|
||||
if (*values == NULL)
|
||||
if (values == NULL || values[0] == NULL)
|
||||
{
|
||||
g_strfreev (values);
|
||||
return NULL;
|
||||
@ -307,11 +305,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin)
|
||||
mc_skin_color_check_bw_mode (mc_skin);
|
||||
|
||||
orig_groups = groups = mc_config_get_groups (mc_skin->config, &items_count);
|
||||
|
||||
if (groups == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (*groups == NULL)
|
||||
if (groups == NULL || groups[0] == NULL)
|
||||
{
|
||||
g_strfreev (groups);
|
||||
return FALSE;
|
||||
|
@ -605,9 +605,7 @@ load_keys_from_section (const char *terminal, mc_config_t * cfg)
|
||||
}
|
||||
|
||||
profile_keys++;
|
||||
|
||||
if (values != NULL)
|
||||
g_strfreev (values);
|
||||
g_strfreev (values);
|
||||
}
|
||||
g_strfreev (keys);
|
||||
g_free (section_name);
|
||||
@ -659,9 +657,7 @@ load_keymap_from_section (const char *section_name, GArray * keymap, mc_config_t
|
||||
}
|
||||
|
||||
profile_keys++;
|
||||
|
||||
if (values != NULL)
|
||||
g_strfreev (values);
|
||||
g_strfreev (values);
|
||||
}
|
||||
g_strfreev (keys);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user