diff options
author | frsfnrrg <frsfnrrg@users.noreply.github.com> | 2018-07-17 11:19:32 -0400 |
---|---|---|
committer | frsfnrrg <frsfnrrg@users.noreply.github.com> | 2018-07-17 11:35:00 -0400 |
commit | 600676688a47bde05bc12110818127c5300dd876 (patch) | |
tree | aa359ee81e7148668eeeba6622a5b7b381747921 /sway/config.c | |
parent | b3014f7b168eb074bd071ee7cb930d74158a2895 (diff) |
Free individual criteria in free_config
Also free cmd_list when cleaning up a struct criteria.
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 2c051146..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); |