[evolution] Bug 628482 - e_shell_settings_install_property_for_key memory leak
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 628482 - e_shell_settings_install_property_for_key memory leak
- Date: Wed, 1 Sep 2010 11:07:33 +0000 (UTC)
commit f0d7a4142e8fb4ea492657aeb67c5a7bacf7af89
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Sep 1 07:06:48 2010 -0400
Bug 628482 - e_shell_settings_install_property_for_key memory leak
shell/e-shell-settings.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 7c5cac4..9503f96 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -60,16 +60,19 @@ shell_settings_pspec_for_key (const gchar *property_name,
entry = gconf_client_get_entry (client, gconf_key, NULL, TRUE, &error);
if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
return NULL;
}
schema_name = gconf_entry_get_schema_name (entry);
- if (schema_name == NULL) {
- return NULL;
- }
+ g_return_val_if_fail (schema_name != NULL, NULL);
schema = gconf_client_get_schema (client, schema_name, &error);
if (error != NULL) {
+ g_warning ("%s", error->message);
+ gconf_entry_unref (entry);
+ g_error_free (error);
return NULL;
}
@@ -157,6 +160,7 @@ shell_settings_pspec_for_key (const gchar *property_name,
gconf_value_free (default_value);
gconf_schema_free (schema);
+ gconf_entry_unref (entry);
return pspec;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]