r20886 - gnucash/trunk/src/gnome - Correct memory leak found with Valgrind.

J. Alex Aycinena alex.aycinena at code.gnucash.org
Sat Jul 9 22:02:38 EDT 2011


Author: alex.aycinena
Date: 2011-07-09 22:02:38 -0400 (Sat, 09 Jul 2011)
New Revision: 20886
Trac: http://svn.gnucash.org/trac/changeset/20886

Modified:
   gnucash/trunk/src/gnome/dialog-tax-info.c
Log:
Correct memory leak found with Valgrind.

Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c	2011-07-09 14:09:09 UTC (rev 20885)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c	2011-07-10 02:02:38 UTC (rev 20886)
@@ -95,6 +95,8 @@
 {
     GtkWidget * dialog;
 
+    GladeXML * xml;
+
     GtkWidget * entity_name_display;
     GtkWidget * entity_name_entry;
     GtkWidget * entity_type_display;
@@ -783,6 +785,8 @@
 
     gnc_unregister_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
 
+    g_object_unref (ti_dialog->xml);
+
     destroy_tax_type_infos (ti_dialog->entity_type_infos);
     ti_dialog->entity_type_infos = NULL;
 
@@ -1308,6 +1312,7 @@
     GtkWidget *label;
 
     xml = gnc_glade_xml_new ("tax.glade", "Tax Information Dialog");
+    ti_dialog->xml = xml;
 
     dialog = glade_xml_get_widget (xml, "Tax Information Dialog");
     ti_dialog->dialog = dialog;



More information about the gnucash-changes mailing list