aboutsummaryrefslogtreecommitdiffstats
path: root/camel/string-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/string-utils.c')
-rw-r--r--camel/string-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/camel/string-utils.c b/camel/string-utils.c
index 7cfd07e6d8..e53c41308e 100644
--- a/camel/string-utils.c
+++ b/camel/string-utils.c
@@ -156,13 +156,15 @@ static void
__string_list_free_string (gpointer data, gpointer user_data)
{
gchar *string = (gchar *)data;
- g_free(string);
+ g_free (string);
}
void
string_list_free (GList *string_list)
{
+ if (string_list == NULL) return;
+
g_list_foreach (string_list, __string_list_free_string, NULL);
g_list_free (string_list);
}