Skip to content

Commit

Permalink
Merge pull request andlabs#500 from L4r0x/table-mem-leak
Browse files Browse the repository at this point in the history
Fix memory leak in uiTable setEditable on unix.
  • Loading branch information
andlabs authored Jun 8, 2020
2 parents 4ee9c47 + 6b124b6 commit 34d1d0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unix/table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -256,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) {
Expand Down

0 comments on commit 34d1d0a

Please sign in to comment.