mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-10 10:33:42 +01:00
glib/*: Use g_list_free_full()
This commit is contained in:
@@ -835,8 +835,7 @@ g_match_info_expand_references (const GMatchInfo *match_info,
|
||||
result = g_string_sized_new (strlen (string_to_expand));
|
||||
interpolate_replacement (match_info, result, list);
|
||||
|
||||
g_list_foreach (list, (GFunc)free_interpolation_data, NULL);
|
||||
g_list_free (list);
|
||||
g_list_free_full (list, (GDestroyNotify) free_interpolation_data);
|
||||
|
||||
return g_string_free (result, FALSE);
|
||||
}
|
||||
@@ -2062,8 +2061,7 @@ g_regex_split_full (const GRegex *regex,
|
||||
if (tmp_error != NULL)
|
||||
{
|
||||
g_propagate_error (error, tmp_error);
|
||||
g_list_foreach (list, (GFunc)g_free, NULL);
|
||||
g_list_free (list);
|
||||
g_list_free_full (list, g_free);
|
||||
match_info->pos = -1;
|
||||
return NULL;
|
||||
}
|
||||
@@ -2385,8 +2383,7 @@ split_replacement (const gchar *replacement,
|
||||
start = p = expand_escape (replacement, p, data, error);
|
||||
if (p == NULL)
|
||||
{
|
||||
g_list_foreach (list, (GFunc)free_interpolation_data, NULL);
|
||||
g_list_free (list);
|
||||
g_list_free_full (list, (GDestroyNotify) free_interpolation_data);
|
||||
free_interpolation_data (data);
|
||||
|
||||
return NULL;
|
||||
@@ -2617,8 +2614,7 @@ g_regex_replace (const GRegex *regex,
|
||||
if (tmp_error != NULL)
|
||||
g_propagate_error (error, tmp_error);
|
||||
|
||||
g_list_foreach (list, (GFunc)free_interpolation_data, NULL);
|
||||
g_list_free (list);
|
||||
g_list_free_full (list, (GDestroyNotify) free_interpolation_data);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -2827,8 +2823,7 @@ g_regex_check_replacement (const gchar *replacement,
|
||||
if (has_references)
|
||||
*has_references = interpolation_list_needs_match (list);
|
||||
|
||||
g_list_foreach (list, (GFunc) free_interpolation_data, NULL);
|
||||
g_list_free (list);
|
||||
g_list_free_full (list, (GDestroyNotify) free_interpolation_data);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user