summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-01-04 19:39:33 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-01-04 19:39:33 -0500
commit33b24736c78d9993a26d295ea3e56ad77d6f1390 (patch)
tree0273394f033a249dad6484e39befd80a83ad7419 /sway
parentMerge pull request #433 from crondog/issue431 (diff)
downloadsway-33b24736c78d9993a26d295ea3e56ad77d6f1390.tar.gz
sway-33b24736c78d9993a26d295ea3e56ad77d6f1390.tar.zst
sway-33b24736c78d9993a26d295ea3e56ad77d6f1390.zip
Free wordexp_t in config.c:get_config_path
Thanks @jollywho
Diffstat (limited to 'sway')
-rw-r--r--sway/config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index 1973de02..c362f388 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -174,9 +174,11 @@ static char *get_config_path(void) {
174 if (wordexp(config_paths[i], &p, 0) == 0) { 174 if (wordexp(config_paths[i], &p, 0) == 0) {
175 path = p.we_wordv[0]; 175 path = p.we_wordv[0];
176 if (file_exists(path)) { 176 if (file_exists(path)) {
177 wordfree(&p);
177 return path; 178 return path;
178 } 179 }
179 } 180 }
181 wordfree(&p);
180 } 182 }
181 183
182 return NULL; // Not reached 184 return NULL; // Not reached