mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
[gsettings.cpp] g_settings_schema_unref after g_object_get
g_object_get may be reffing the schema which prevents it freeing.
This commit is contained in:
parent
0d326fa100
commit
9dfe223fc7
@ -67,6 +67,7 @@ static bool gnc_gsettings_is_valid_key(GSettings *settings, const gchar *key)
|
|||||||
auto keys = g_settings_schema_list_keys (schema);
|
auto keys = g_settings_schema_list_keys (schema);
|
||||||
auto found = (keys && g_strv_contains(keys, key));
|
auto found = (keys && g_strv_contains(keys, key));
|
||||||
g_strfreev (keys);
|
g_strfreev (keys);
|
||||||
|
g_settings_schema_unref (schema);
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
@ -87,6 +88,7 @@ static GSettings * gnc_gsettings_get_settings_obj (const gchar *schema_str)
|
|||||||
g_free(full_name);
|
g_free(full_name);
|
||||||
|
|
||||||
LEAVE("");
|
LEAVE("");
|
||||||
|
g_settings_schema_unref (schema);
|
||||||
return gset;
|
return gset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,6 +474,7 @@ gnc_gsettings_reset_schema (const gchar *schema_str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (gs_obj);
|
g_object_unref (gs_obj);
|
||||||
|
g_settings_schema_unref (schema);
|
||||||
g_strfreev (keys);
|
g_strfreev (keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user