diff options
Diffstat (limited to 'camel/gmime-content-field.c')
-rw-r--r-- | camel/gmime-content-field.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/camel/gmime-content-field.c b/camel/gmime-content-field.c index 7f93ae1db2..6788332753 100644 --- a/camel/gmime-content-field.c +++ b/camel/gmime-content-field.c @@ -52,7 +52,7 @@ gmime_content_field_new (const gchar *type, const gchar *subtype) ctf = g_new (GMimeContentField, 1); ctf->type = g_strdup (type); ctf->subtype = g_strdup (subtype); - ctf->parameters = g_hash_table_new (g_strcase_hash, g_strcase_equal); + ctf->parameters = g_hash_table_new (g_strcase_hash, g_strcase_equal); ctf->ref = 1; return ctf; @@ -79,6 +79,8 @@ gmime_content_field_free (GMimeContentField *content_field) { if (!content_field) return; + g_assert (content_field->ref <= 0); + g_hash_table_foreach (content_field->parameters, _free_parameter, NULL); g_free (content_field->type); g_free (content_field->subtype); @@ -293,7 +295,6 @@ void gmime_content_field_construct_from_string (GMimeContentField *content_field, const gchar *string) { gint first, len; - gchar *str; gint i=0; gchar *type, *subtype; gchar *param_name, *param_value; |