From be75a433fcdcd5262397834484f1041ff6fddc4e Mon Sep 17 00:00:00 2001 From: jean <27791933+jeanlaroche@users.noreply.github.com> Date: Fri, 8 Oct 2021 13:38:00 -0700 Subject: [PATCH] Fix memory leak when the user cancels the matching process --- gnucash/import-export/ofx/gnc-ofx-import.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c index 6423ddbf35..f82c968008 100644 --- a/gnucash/import-export/ofx/gnc-ofx-import.c +++ b/gnucash/import-export/ofx/gnc-ofx-import.c @@ -1130,7 +1130,11 @@ gnc_ofx_match_done (GtkDialog *dialog, gpointer user_data) /* The the user did not click OK, don't process the rest of the * transaction, don't go to the next of xfile. */ - if (info->response != GTK_RESPONSE_OK) return; + if (info->response != GTK_RESPONSE_OK) + { + g_free (info); + return; + } if (info->trans_list) {