diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c index f63835bf..c620e4c7 100644 --- a/sway/config.c +++ b/sway/config.c @@ -24,6 +24,7 @@ #include "sway/input/seat.h" #include "sway/commands.h" #include "sway/config.h" +#include "sway/criteria.h" #include "sway/tree/arrange.h" #include "sway/tree/layout.h" #include "sway/tree/workspace.h" @@ -105,7 +106,12 @@ void free_config(struct sway_config *config) { } list_free(config->seat_configs); } - list_free(config->criteria); + if (config->criteria) { + for (int i = 0; i < config->criteria->length; ++i) { + criteria_destroy(config->criteria->items[i]); + } + list_free(config->criteria); + } list_free(config->no_focus); list_free(config->active_bar_modifiers); list_free(config->config_chain); @@ -474,7 +480,6 @@ static bool load_include_config(const char *path, const char *parent_dir, list_del(config->config_chain, index); return false; } - free(real_path); // restore current_config_path config->current_config_path = parent_config; |