aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/config.c b/sway/config.c
index ff7de4b9..efb95e31 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -654,8 +654,7 @@ bool read_config(FILE *file, struct sway_config *config,
654 654
655 if (read + length > config_size) { 655 if (read + length > config_size) {
656 wlr_log(WLR_ERROR, "Config file changed during reading"); 656 wlr_log(WLR_ERROR, "Config file changed during reading");
657 list_foreach(stack, free); 657 free_flat_list(stack);
658 list_free(stack);
659 free(line); 658 free(line);
660 return false; 659 return false;
661 } 660 }
@@ -684,8 +683,7 @@ bool read_config(FILE *file, struct sway_config *config,
684 } 683 }
685 char *expanded = expand_line(block, line, brace_detected > 0); 684 char *expanded = expand_line(block, line, brace_detected > 0);
686 if (!expanded) { 685 if (!expanded) {
687 list_foreach(stack, free); 686 free_flat_list(stack);
688 list_free(stack);
689 free(line); 687 free(line);
690 return false; 688 return false;
691 } 689 }
@@ -750,8 +748,7 @@ bool read_config(FILE *file, struct sway_config *config,
750 free(line); 748 free(line);
751 free_cmd_results(res); 749 free_cmd_results(res);
752 } 750 }
753 list_foreach(stack, free); 751 free_flat_list(stack);
754 list_free(stack);
755 config->current_config_line_number = 0; 752 config->current_config_line_number = 0;
756 config->current_config_line = NULL; 753 config->current_config_line = NULL;
757 754