projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ddb2f8
)
GKeyFile: free group comments when the group is removed
author
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Mon, 12 Dec 2011 18:35:14 +0000
(18:35 +0000)
committer
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 12:26:16 +0000
(12:26 +0000)
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
patch
|
blob
|
history
diff --git
a/glib/gkeyfile.c
b/glib/gkeyfile.c
index
dc4faf3
..
e8eb861
100644
(file)
--- 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);