From 54567bd4f64a8fde8b7b3820af091c6c488c2b35 Mon Sep 17 00:00:00 2001 From: Lars Wrenger Date: Sun, 7 Jun 2020 10:53:10 +0200 Subject: [PATCH 1/2] Fix memory leak uiTable setEditable on unix. The tree_model_path was not freed correctly. --- unix/table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unix/table.c b/unix/table.c index d1e6fe60..86bfefd5 100644 --- a/unix/table.c +++ b/unix/table.c @@ -62,6 +62,7 @@ static void setEditable(uiTableModel *m, GtkTreeIter *iter, int modelColumn, Gtk // TODO avoid the need for this path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter); row = gtk_tree_path_get_indices(path)[0]; + gtk_tree_path_free(path); editable = uiprivTableModelCellEditable(m, row, modelColumn) != 0; g_object_set(r, prop, editable, NULL); } From 6b124b6f5541f0efab5a62c5b9c753f504bfc9d5 Mon Sep 17 00:00:00 2001 From: Lars Wrenger Date: Sun, 7 Jun 2020 20:41:31 +0200 Subject: [PATCH 2/2] Fix memory leak in uiTable setEditable on unix. GtkTreePath was not freed correctly. --- unix/table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unix/table.c b/unix/table.c index 86bfefd5..e29ada07 100644 --- a/unix/table.c +++ b/unix/table.c @@ -257,6 +257,7 @@ static void progressBarColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r, // TODO avoid the need for this path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter); rc->row = gtk_tree_path_get_indices(path)[0]; + gtk_tree_path_free(path); rc->col = p->modelColumn; val = (gint *) g_hash_table_lookup(p->t->indeterminatePositions, rc); if (pval == -1) {