[gconf] Do not leak a GConfEntry when we ignore default values
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gconf] Do not leak a GConfEntry when we ignore default values
- Date: Thu, 8 Apr 2010 13:26:28 +0000 (UTC)
commit 7c18f17b0c9556dab4502beca4ea9a4e425449b9
Author: Alberto Garcia <agarcia igalia com>
Date: Thu Apr 8 15:25:28 2010 +0200
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.
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 1fad73e..5886a79 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]