Free wordexp_t in config.c:get_config_path

Thanks @jollywho
This commit is contained in:
Drew DeVault 2016-01-04 19:39:33 -05:00
parent 5af4e747d3
commit 33b24736c7

View file

@ -174,9 +174,11 @@ static char *get_config_path(void) {
if (wordexp(config_paths[i], &p, 0) == 0) {
path = p.we_wordv[0];
if (file_exists(path)) {
wordfree(&p);
return path;
}
}
wordfree(&p);
}
return NULL; // Not reached