files: fix a memory leak

This commit is contained in:
Benno Schulenberg 2016-05-21 21:32:47 +02:00
parent 2e75c22759
commit 60da39cdf7
1 changed files with 1 additions and 1 deletions

View File

@ -1398,7 +1398,7 @@ char *get_full_path(const char *origpath)
while (d_here == NULL && attempts < 20) {
IGNORE_CALL_RESULT(chdir(".."));
d_here = getcwd(NULL, PATH_MAX + 1);
d_here = getcwd(currentdir, PATH_MAX + 1);
attempts++;
}