r17026 - gnucash/trunk/src - Free a few GtkTreePaths that were leaked.
Andreas Köhler
andi5 at cvs.gnucash.org
Mon Mar 10 21:00:56 EDT 2008
Author: andi5
Date: 2008-03-10 21:00:55 -0400 (Mon, 10 Mar 2008)
New Revision: 17026
Trac: http://svn.gnucash.org/trac/changeset/17026
Modified:
gnucash/trunk/src/gnome-utils/account-quickfill.c
gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
Log:
Free a few GtkTreePaths that were leaked.
Modified: gnucash/trunk/src/gnome-utils/account-quickfill.c
===================================================================
--- gnucash/trunk/src/gnome-utils/account-quickfill.c 2008-03-10 07:07:06 UTC (rev 17025)
+++ gnucash/trunk/src/gnome-utils/account-quickfill.c 2008-03-11 01:00:55 UTC (rev 17026)
@@ -273,8 +273,11 @@
path = gtk_tree_row_reference_get_path(tmp->data);
gtk_tree_row_reference_free(tmp->data);
if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(qfb->list_store),
- &iter, path))
+ &iter, path)) {
+ gtk_tree_path_free(path);
continue;
+ }
+ gtk_tree_path_free(path);
gtk_tree_model_get(GTK_TREE_MODEL(qfb->list_store), &iter,
ACCOUNT_POINTER, &account,
-1);
@@ -326,6 +329,7 @@
&iter, path)) {
gtk_list_store_remove(qfb->list_store, &iter);
}
+ gtk_tree_path_free(path);
}
break;
Modified: gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c 2008-03-10 07:07:06 UTC (rev 17025)
+++ gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c 2008-03-11 01:00:55 UTC (rev 17026)
@@ -109,12 +109,12 @@
if (gtk_tree_row_reference_valid (ssi->row_ref)) {
StyleSheetDialog * ss = gnc_style_sheet_dialog;
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL(ss->list_store), &iter,
- gtk_tree_row_reference_get_path (ssi->row_ref)))
+ GtkTreePath *path = gtk_tree_row_reference_get_path (ssi->row_ref);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL(ss->list_store), &iter, path))
gtk_list_store_set (ss->list_store, &iter,
COLUMN_DIALOG, NULL,
-1);
-
+ gtk_tree_path_free(path);
}
gtk_tree_row_reference_free (ssi->row_ref);
gnc_option_db_destroy(ssi->odb);
More information about the gnucash-changes
mailing list