From 1cb6fc32d8ed71fc639f1dfa6d91c9c087042a36 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Tue, 10 Feb 2009 21:16:35 +0000 Subject: [PATCH] Bug #552275, #434944: Fix generic import skipped transactions gnc_import_TransInfo_delete() was defined but never called! This led to a memory leak, and erroneous behaviour. Bug 552275 - Cancelling OFX Import Still Adds Entries Bug 434944 - Refused transactions from import appear in register Patch by Alan Jenkins BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17891 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/import-main-matcher.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/import-export/import-main-matcher.c b/src/import-export/import-main-matcher.c index 66990855dc..ded996fff9 100644 --- a/src/import-export/import-main-matcher.c +++ b/src/import-export/import-main-matcher.c @@ -89,9 +89,23 @@ refresh_model_row(GNCImportMainMatcher *gui, GtkTreeModel *model, void gnc_gen_trans_list_delete (GNCImportMainMatcher *info) { + GtkTreeModel *model; + GtkTreeIter iter; + GNCImportTransInfo *trans_info; + if (info == NULL) return; + model = gtk_tree_view_get_model(info->view); + if (gtk_tree_model_get_iter_first(model, &iter)) { + do { + gtk_tree_model_get(model, &iter, + DOWNLOADED_COL_DATA, &trans_info, + -1); + gnc_import_TransInfo_delete(trans_info); + } while (gtk_tree_model_iter_next (model, &iter)); + } + gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->dialog)); gnc_import_Settings_delete (info->user_settings); gtk_widget_destroy (GTK_WIDGET (info->dialog));