summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2010-04-08 15:25:28 +0200
committerVincent Untz <vuntz@gnome.org>2010-04-08 15:25:28 +0200
commit7c18f17b0c9556dab4502beca4ea9a4e425449b9 (patch)
tree9c2ac9de9bbae5167de4e71656d34ba83822ad27
parent9b99bfea755278a9a06ef019e62308d095d330e0 (diff)
downloadgconf-7c18f17b0c9556dab4502beca4ea9a4e425449b9.tar.gz
Do not leak a GConfEntry when we ignore default values
If the returned entry is the default one and we ignore default values, we need to free the entry to avoid a leak.
-rw-r--r--gconf/gconf-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c
index 1fad73ee..5886a79d 100644
--- a/gconf/gconf-client.c
+++ b/gconf/gconf-client.c
@@ -1302,7 +1302,10 @@ get (GConfClient *client,
* to the caller
*/
if (gconf_entry_get_is_default (entry) && !use_default)
- return NULL;
+ {
+ gconf_entry_free (entry);
+ return NULL;
+ }
else
return entry;
}