From 053fb09d1e19e7eebcf6908d2b8eb70b7b51db7a Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Wed, 16 Dec 2015 13:06:54 +0100 Subject: [PATCH] Use free_flat_list for simple char* list. No need to reimplement free_flat_list functionality. --- sway/config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sway/config.c b/sway/config.c index e86bdab5..2f89cd39 100644 --- a/sway/config.c +++ b/sway/config.c @@ -49,10 +49,7 @@ static void free_bar(struct bar_config *bar) { } list_free(bar->bindings); - for (i = 0; i < bar->outputs->length; ++i) { - free(bar->outputs->items[i]); - } - list_free(bar->outputs); + free_flat_list(bar->outputs); free(bar); }