mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[dialog-lot-viewer] g_free a GList* properly
g_list_free requires the argument is the head of a GList. Calling g_list_reverse makes the filtered_list points to the last element. Assigning filtered_list to the result of g_list_reverse ensures it still points to the head, allowing g_list_free to free the list properly.
This commit is contained in:
parent
5ced0d932a
commit
6fd19f2eea
@ -231,9 +231,10 @@ lv_show_splits_free (GNCLotViewer *lv)
|
||||
filtered_list = g_list_prepend (filtered_list, split);
|
||||
}
|
||||
}
|
||||
filtered_list = g_list_reverse (filtered_list);
|
||||
|
||||
/* display list */
|
||||
gnc_split_viewer_fill(lv, lv->split_free_store, g_list_reverse (filtered_list));
|
||||
gnc_split_viewer_fill(lv, lv->split_free_store, filtered_list);
|
||||
g_list_free (filtered_list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user