Cleanup list code

This commit is contained in:
Ian Fan 2018-12-08 23:55:14 +00:00
parent 19e831ed3d
commit c8776fac42
11 changed files with 17 additions and 37 deletions

View file

@ -49,8 +49,7 @@ void free_bar_config(struct bar_config *bar) {
free(bar->font);
free(bar->separator_symbol);
for (int i = 0; i < bar->bindings->length; i++) {
struct bar_binding *binding = bar->bindings->items[i];
free_bar_binding(binding);
free_bar_binding(bar->bindings->items[i]);
}
list_free(bar->bindings);
free_flat_list(bar->outputs);

View file

@ -117,11 +117,8 @@ void free_seat_config(struct seat_config *seat) {
free(seat->name);
for (int i = 0; i < seat->attachments->length; ++i) {
struct seat_attachment_config *attachment =
seat->attachments->items[i];
seat_attachment_config_free(attachment);
seat_attachment_config_free(seat->attachments->items[i]);
}
list_free(seat->attachments);
free(seat);
}