Skip to content

Commit

Permalink
[gnc-tree-model-price.c] bugfix adding a price causes segfault
Browse files Browse the repository at this point in the history
Bug in a99491d -- ns_list was prematurely freed.
  • Loading branch information
christopherlam committed Sep 9, 2024
1 parent 829cf34 commit f6bca45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/gnome-utils/gnc-tree-model-price.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
return path;
}

g_list_free (ns_list);
/* Create a path to the price. */
commodity = gnc_price_get_commodity((GNCPrice*)iter->user_data2);
name_space = gnc_commodity_get_namespace_ds(commodity);
Expand All @@ -611,6 +610,7 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
gtk_tree_path_append_index (path, GPOINTER_TO_INT(iter->user_data3));
debug_path(LEAVE, path);
g_list_free (cm_list);
g_list_free (ns_list);
return path;
}

Expand Down

0 comments on commit f6bca45

Please sign in to comment.