Memory leak in gnc-gsettings.c

This commit is contained in:
Phil Longstaff 2016-02-28 07:42:37 -05:00
parent 97b7c26570
commit cb88fe8f93

View File

@ -95,7 +95,7 @@ static GSettings * gnc_gsettings_get_schema_ptr (const gchar *schema_str)
ENTER("");
if (!schema_hash)
schema_hash = g_hash_table_new (g_str_hash, g_str_equal);
schema_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
gset = g_hash_table_lookup (schema_hash, full_name);
DEBUG ("Looking for schema %s returned gsettings %p", full_name, gset);
@ -108,8 +108,10 @@ static GSettings * gnc_gsettings_get_schema_ptr (const gchar *schema_str)
else
PWARN ("Ignoring attempt to access unknown gsettings schema %s", full_name);
}
g_free(full_name);
else
{
g_free(full_name);
}
LEAVE("");
return gset;