diff options
Diffstat (limited to 'sway/config')
-rw-r--r-- | sway/config/bar.c | 7 | ||||
-rw-r--r-- | sway/config/seat.c | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index 36e10527..45c9e998 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c @@ -49,13 +49,10 @@ 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); - if (bar->outputs) { - free_flat_list(bar->outputs); - } + list_free_items_and_destroy(bar->outputs); if (bar->pid != 0) { terminate_swaybar(bar->pid); } diff --git a/sway/config/seat.c b/sway/config/seat.c index 56fa6095..1cb4c363 100644 --- a/sway/config/seat.c +++ b/sway/config/seat.c @@ -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); } |