From 60da39cdf7f5a268994177ae49b35fd39830be78 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 21 May 2016 21:32:47 +0200 Subject: [PATCH] files: fix a memory leak --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 22fe6ecc..471420c7 100644 --- a/src/files.c +++ b/src/files.c @@ -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++; }