[glib/glib-2-30] GKeyFile: free group comments when the group is removed
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] GKeyFile: free group comments when the group is removed
- Date: Mon, 16 Jan 2012 18:33:23 +0000 (UTC)
commit 43c18ec7392b3dbdbae7a8056d665e36e44e86a7
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Mon Dec 12 18:35:14 2011 +0000
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>
glib/gkeyfile.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 3463488..d9389f2 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -3351,6 +3351,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]