From b5cff8e9b5486c55eeaf6c49aedd36e2bd2da0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 2 Mar 2007 13:19:26 +0000 Subject: [PATCH] Patch from Mike Alexander to fix a memory leak in the summary bar. #413568. When gnc_main_window_summary_refresh is called to update the summary bar at the bottom of the main window, it gets a GList to manage the various currencies involved. It never frees this list so each call leaks some memory. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15676 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/window-main-summarybar.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gnome-utils/window-main-summarybar.c b/src/gnome-utils/window-main-summarybar.c index e3b72d3d78..f6c89c43b0 100644 --- a/src/gnome-utils/window-main-summarybar.c +++ b/src/gnome-utils/window-main-summarybar.c @@ -434,6 +434,14 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary) gtk_combo_box_set_active(GTK_COMBO_BOX(summary->totals_combo), 0); } + + /* Free the list we created for this */ + for (current = g_list_first(currency_list); + current; + current = g_list_next(current)) { + g_free(current->data); + } + g_list_free(currency_list); } static void