mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
sway/config.c: Move the wordfree call before the if statement so it is always called
This commit is contained in:
parent
06986e58b8
commit
e1fa51a152
|
@ -278,8 +278,8 @@ static char *get_config_path(void) {
|
||||||
for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) {
|
for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) {
|
||||||
if (wordexp(config_paths[i], &p, 0) == 0) {
|
if (wordexp(config_paths[i], &p, 0) == 0) {
|
||||||
path = strdup(p.we_wordv[0]);
|
path = strdup(p.we_wordv[0]);
|
||||||
if (file_exists(path)) {
|
|
||||||
wordfree(&p);
|
wordfree(&p);
|
||||||
|
if (file_exists(path)) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue