From 9f5d5396579e0029c8841992ca39e850281a2df6 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 4 Jul 2018 18:43:35 +0900 Subject: [PATCH] config: add a couple of forgotten frees --- sway/config.c | 7 ++++++- sway/config/bar.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sway/config.c b/sway/config.c index 0aae1696..89b7d349 100644 --- a/sway/config.c +++ b/sway/config.c @@ -87,7 +87,12 @@ void free_config(struct sway_config *config) { list_free(config->cmd_queue); list_free(config->workspace_outputs); list_free(config->pid_workspaces); - list_free(config->output_configs); + if (config->output_configs) { + for (int i = 0; i < config->output_configs->length; i++) { + free_output_config(config->output_configs->items[i]); + } + list_free(config->output_configs); + } if (config->input_configs) { for (int i = 0; i < config->input_configs->length; i++) { free_input_config(config->input_configs->items[i]); diff --git a/sway/config/bar.c b/sway/config/bar.c index b97076a0..ee062c6a 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c @@ -30,6 +30,7 @@ void free_bar_config(struct bar_config *bar) { if (!bar) { return; } + free(bar->id); free(bar->mode); free(bar->position); free(bar->hidden_state);