From 90baa7e460c86c4c1d22f791482a2380467a190a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 12 Dec 2011 18:35:14 +0000 Subject: [PATCH] GKeyFile: free group comments when the group is removed These were leaked. Valgrind was sad. Signed-off-by: Simon McVittie Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi --- glib/gkeyfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index dc4faf312..e8eb861ab 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -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); -- 2.11.4.GIT