diff options
author | Alberto Garcia <agarcia@igalia.com> | 2010-04-08 15:25:28 +0200 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2010-04-08 15:25:28 +0200 |
commit | 7c18f17b0c9556dab4502beca4ea9a4e425449b9 (patch) | |
tree | 9c2ac9de9bbae5167de4e71656d34ba83822ad27 | |
parent | 9b99bfea755278a9a06ef019e62308d095d330e0 (diff) | |
download | gconf-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.c | 5 |
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; } |