mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[import-main-matcher] plug Hash Table & GList leaks.
A couple of hash tables were not destroyed. GList* list was being modified to NULL therefore not freed with g_list_free_full.
This commit is contained in:
parent
a000c05c19
commit
85af91569c
@ -221,7 +221,9 @@ gnc_gen_trans_list_delete (GNCImportMainMatcher *info)
|
||||
// We've deferred balance computations on many accounts. Let's do it now that we're done.
|
||||
update_all_balances (info);
|
||||
|
||||
gnc_import_PendingMatches_delete (info->pending_matches);
|
||||
g_hash_table_foreach_remove (info->acct_id_hash, delete_hash, NULL);
|
||||
g_hash_table_destroy (info->acct_id_hash);
|
||||
info->acct_id_hash = NULL;
|
||||
g_free (info);
|
||||
}
|
||||
@ -1052,10 +1054,10 @@ gnc_gen_trans_row_changed_cb (GtkTreeSelection *selection,
|
||||
{
|
||||
// Unselect rows that should not be selectable
|
||||
GList* list = gtk_tree_selection_get_selected_rows (selection, &model);
|
||||
for ( ; list; list=list->next)
|
||||
for (GList *n = list; n; n = n->next)
|
||||
{
|
||||
if (get_action_for_path (list->data, model) != GNCImport_ADD)
|
||||
gtk_tree_selection_unselect_path (selection, list->data);
|
||||
if (get_action_for_path (n->data, model) != GNCImport_ADD)
|
||||
gtk_tree_selection_unselect_path (selection, n->data);
|
||||
}
|
||||
g_list_free_full (list, (GDestroyNotify)gtk_tree_path_free);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user