From 2443d8faf7c0d13a7ea564a8ee0376f2e159bcd8 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 31 Jul 2022 10:19:55 +0800 Subject: [PATCH] [import-main-matcher] tidy: free GList before going out of scope ...instead of in a separate function. This matches c++ RAII behaviour. --- gnucash/import-export/import-main-matcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c index aaa0fb172d..27cffb2ae4 100644 --- a/gnucash/import-export/import-main-matcher.c +++ b/gnucash/import-export/import-main-matcher.c @@ -403,8 +403,6 @@ remove_top_matches (GNCImportMainMatcher* gui, GtkTreeModel* model, GList* confl match_trans = g_list_remove (match_trans, match_trans->data); gnc_import_TransInfo_set_match_list (trans_info, match_trans); } - - g_list_free (conflicts); } static void @@ -448,6 +446,8 @@ resolve_conflicts (GNCImportMainMatcher *info) valid = gtk_tree_model_iter_next (model, &import_iter); /* NOTE: The loop is guaranteed to terminate because whenever we go back to the top * we remove at least 1 match, and there's a finite number of them. */ + + g_list_free (conflicts); } // Refresh all