From f0d7a4142e8fb4ea492657aeb67c5a7bacf7af89 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 1 Sep 2010 07:06:48 -0400 Subject: Bug 628482 - e_shell_settings_install_property_for_key memory leak --- shell/e-shell-settings.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c index 7c5cac4e53..9503f967f7 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; -- cgit v1.2.3