mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-sx-instance-model] free some GHashTable keys & Values
This commit is contained in:
parent
7c2a249511
commit
ebf3439558
@ -101,7 +101,8 @@ scrub_sx_split_numeric (Split* split, gboolean is_credit, GList **changes)
|
||||
const char *numeric = is_credit ? "sx-credit-numeric" : "sx-debit-numeric";
|
||||
char *formval;
|
||||
gnc_numeric *numval = NULL;
|
||||
GHashTable *parser_vars = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
GHashTable *parser_vars = g_hash_table_new_full
|
||||
(g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnc_sx_variable_free);
|
||||
char *error_loc;
|
||||
gnc_numeric amount = gnc_numeric_zero ();
|
||||
gboolean parse_result = FALSE;
|
||||
@ -205,6 +206,9 @@ GHashTable*
|
||||
gnc_sx_instance_get_variables_for_parser(GHashTable *instance_var_hash)
|
||||
{
|
||||
GHashTable *parser_vars;
|
||||
|
||||
/* fixme: the following GHashTable should g_free keys and
|
||||
gnc_sx_variable_free the values, however this breaks SX formulas */
|
||||
parser_vars = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
g_hash_table_foreach(instance_var_hash, (GHFunc)_sx_var_to_raw_numeric, parser_vars);
|
||||
return parser_vars;
|
||||
|
Loading…
Reference in New Issue
Block a user