summaryrefslogtreecommitdiffstats
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c
index e0b65615..5b2b6569 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -128,6 +128,8 @@ void free_output_config(struct output_config *oc) {
128 return; 128 return;
129 } 129 }
130 free(oc->name); 130 free(oc->name);
131 free(oc->background);
132 free(oc->background_option);
131 free(oc); 133 free(oc);
132} 134}
133 135
@@ -548,9 +550,12 @@ bool load_main_config(const char *file, bool is_active) {
548 strcpy(_path, base); 550 strcpy(_path, base);
549 strcat(_path, ent->d_name); 551 strcat(_path, ent->d_name);
550 lstat(_path, &s); 552 lstat(_path, &s);
551 if (S_ISREG(s.st_mode)) { 553 if (S_ISREG(s.st_mode) && ent->d_name[0] != '.') {
552 list_add(secconfigs, _path); 554 list_add(secconfigs, _path);
553 } 555 }
556 else {
557 free(_path);
558 }
554 ent = readdir(dir); 559 ent = readdir(dir);
555 } 560 }
556 closedir(dir); 561 closedir(dir);