aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor E <38229097+c-edw@users.noreply.github.com>2019-02-06 14:01:40 +0000
committeremersion <contact@emersion.fr>2019-02-06 18:23:20 +0100
commit855368b67e8b7d0b1dd035bde7f9119d37b35e5d (patch)
tree63ca700cc7ab623b61a0346a567f5a58f6b58de9
parentcdfc7194943d29fc6c099e320c78af8cd47d3e9b (diff)
downloadsway-855368b67e8b7d0b1dd035bde7f9119d37b35e5d.tar.xz
Return false if config could not be loaded.
-rw-r--r--sway/config.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c
index 18fb69d9..455d20cd 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -574,7 +574,13 @@ bool load_include_configs(const char *path, struct sway_config *config,
char **w = p.we_wordv;
size_t i;
for (i = 0; i < p.we_wordc; ++i) {
- load_include_config(w[i], parent_dir, config, swaynag);
+ bool found = load_include_config(w[i], parent_dir, config, swaynag);
+ if (!found) {
+ wordfree(&p);
+ free(parent_path);
+ free(wd);
+ return false;
+ }
}
free(parent_path);
wordfree(&p);