diff options
author | Daniel Lockyer <thisisdaniellockyer@gmail.com> | 2016-04-29 18:36:29 +0100 |
---|---|---|
committer | Daniel Lockyer <thisisdaniellockyer@gmail.com> | 2016-04-29 18:36:29 +0100 |
commit | e1fa51a152bc417e1085867dc6fc00e197f26a0f (patch) | |
tree | 1f10e0f9ed77b680ca1f5cf151df3e4b4c707817 /sway | |
parent | sway/config.c: Change to the useful free_cmd_results helper method (diff) | |
download | sway-e1fa51a152bc417e1085867dc6fc00e197f26a0f.tar.gz sway-e1fa51a152bc417e1085867dc6fc00e197f26a0f.tar.zst sway-e1fa51a152bc417e1085867dc6fc00e197f26a0f.zip |
sway/config.c: Move the wordfree call before the if statement so it is always called
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 82215ba5..f520cc88 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -278,8 +278,8 @@ static char *get_config_path(void) { | |||
278 | for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) { | 278 | for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) { |
279 | if (wordexp(config_paths[i], &p, 0) == 0) { | 279 | if (wordexp(config_paths[i], &p, 0) == 0) { |
280 | path = strdup(p.we_wordv[0]); | 280 | path = strdup(p.we_wordv[0]); |
281 | wordfree(&p); | ||
281 | if (file_exists(path)) { | 282 | if (file_exists(path)) { |
282 | wordfree(&p); | ||
283 | return path; | 283 | return path; |
284 | } | 284 | } |
285 | } | 285 | } |