mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:38:25 -06:00
[gnc-gsettings.cpp] plug a char* leak
full_name leaks if it's already in schema_hash hash table. It would be better to convert GHashTable to unordered_map.
This commit is contained in:
parent
16640be62f
commit
b331ec974e
@ -135,10 +135,11 @@ gnc_gsettings_register_cb (const gchar *schema, const gchar *key,
|
||||
{
|
||||
gs_obj = gnc_gsettings_get_settings_obj (schema);
|
||||
if (G_IS_SETTINGS (gs_obj))
|
||||
g_hash_table_insert (schema_hash, full_name, gs_obj);
|
||||
g_hash_table_insert (schema_hash, g_strdup (full_name), gs_obj);
|
||||
else
|
||||
PWARN ("Ignoring attempt to access unknown gsettings schema %s", full_name);
|
||||
}
|
||||
g_free (full_name);
|
||||
g_return_val_if_fail (G_IS_SETTINGS (gs_obj), 0);
|
||||
|
||||
auto signal = static_cast<char *> (nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user