builder: Minor refactoring

Keep the GString in PropertyInfo around, instead of throwing it
away and just keeping the char*.
This commit is contained in:
Matthias Clasen
2015-09-07 12:25:29 -04:00
parent 15b9feda22
commit 20079a9960
3 changed files with 7 additions and 11 deletions

View File

@ -681,9 +681,8 @@ parse_property (ParserData *data,
static void
free_property_info (PropertyInfo *info)
{
g_free (info->data);
g_string_free (info->text, TRUE);
g_free (info->context);
/* info->text is already freed */
g_slice_free (PropertyInfo, info);
}
@ -1157,8 +1156,6 @@ end_element (GMarkupParseContext *context,
g_string_assign (prop_info->text, translated);
}
prop_info->data = g_string_free (prop_info->text, FALSE);
object_info->properties = g_slist_prepend (object_info->properties, prop_info);
}
else