GKeyFile: free group comments when the group is removed

These were leaked. Valgrind was sad.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Simon McVittie 2011-12-12 18:35:14 +00:00
parent 9ddb2f8091
commit 90baa7e460

View File

@ -3752,6 +3752,12 @@ g_key_file_remove_group_node (GKeyFile *key_file,
g_warn_if_fail (group->key_value_pairs == NULL);
if (group->comment)
{
g_key_file_key_value_pair_free (group->comment);
group->comment = NULL;
}
if (group->lookup_map)
{
g_hash_table_destroy (group->lookup_map);