gnucash maint: gtk_tree_model_get returns a new char* which must be g_freed
Christopher Lam
clam at code.gnucash.org
Sat Jul 16 12:12:46 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/1d09c69a (commit)
from https://github.com/Gnucash/gnucash/commit/fa8a197b (commit)
commit 1d09c69aff7813937b7f0bbc66d620e5c8e09ac1
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Jul 16 17:40:20 2022 +0800
gtk_tree_model_get returns a new char* which must be g_freed
diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index 1796b0b11..9ab11f1e9 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -2150,7 +2150,7 @@ query_tooltip_tree_view_cb (GtkWidget *widget, gint x, gint y,
// Get the iter pointing to our current column
if (gtk_tree_model_get_iter(model, &iter, path) && column)
{
- const gchar *tooltip_text = NULL;
+ gchar *tooltip_text = NULL;
// Select text based on column
gint num_col = gtk_tree_view_column_get_sort_column_id (column);
@@ -2173,6 +2173,7 @@ query_tooltip_tree_view_cb (GtkWidget *widget, gint x, gint y,
gtk_tooltip_set_text (tooltip, tooltip_text);
gtk_tree_view_set_tooltip_cell (tree_view, tooltip, path, column, NULL);
}
+ g_free (tooltip_text);
}
// Clean up the object
gtk_tree_path_free (path);
Summary of changes:
gnucash/import-export/import-main-matcher.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list