aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-08 11:24:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-08 11:24:09 +0000
commit274e5ce5af542ba99fe89d458c8bbbb3f1e9a868 (patch)
tree58bc014c759d125b9c143283c5502219013e5f77 /config.c
parentMerge branch 'url-detection' (diff)
parentmisc: when free:ing tll lists, prefer tll_remove() over tll_free() (diff)
Merge branch 'prefer-tll_remove-over-tll_free'
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/config.c b/config.c
index f7452994..b4518622 100644
--- a/config.c
+++ b/config.c
@@ -2379,9 +2379,10 @@ config_load(struct config *conf, const char *conf_path,
conf->url_launch.raw_cmd = xstrdup("xdg-open ${url}");
tokenize_cmdline(conf->url_launch.raw_cmd, &conf->url_launch.argv);
- tll_foreach(*initial_user_notifications, it)
+ tll_foreach(*initial_user_notifications, it) {
tll_push_back(conf->notifications, it->item);
- tll_free(*initial_user_notifications);
+ tll_remove(*initial_user_notifications, it);
+ }
add_default_key_bindings(conf);
add_default_search_bindings(conf);
@@ -2462,9 +2463,10 @@ config_free(struct config conf)
free_spawn_template(&conf.notify);
free_spawn_template(&conf.url_launch);
for (size_t i = 0; i < ALEN(conf.fonts); i++) {
- tll_foreach(conf.fonts[i], it)
+ tll_foreach(conf.fonts[i], it) {
config_font_destroy(&it->item);
- tll_free(conf.fonts[i]);
+ tll_remove(conf.fonts[i], it);
+ }
}
free(conf.server_socket_path);