AUDIT: r15676 - gnucash/trunk/src/gnome-utils - Patch from Mike Alexander to fix a memory leak in the summary bar. #413568.
Andreas Köhler
andi5 at cvs.gnucash.org
Fri Mar 2 08:19:28 EST 2007
Author: andi5
Date: 2007-03-02 08:19:26 -0500 (Fri, 02 Mar 2007)
New Revision: 15676
Trac: http://svn.gnucash.org/trac/changeset/15676
Modified:
gnucash/trunk/src/gnome-utils/window-main-summarybar.c
Log:
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
Modified: gnucash/trunk/src/gnome-utils/window-main-summarybar.c
===================================================================
--- gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2007-02-28 05:57:19 UTC (rev 15675)
+++ gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2007-03-02 13:19:26 UTC (rev 15676)
@@ -434,6 +434,14 @@
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
More information about the gnucash-changes
mailing list