mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
macos: fix leak in proc_self_dirname()
This commit is contained in:
committed by
Zachary Snow
parent
081111714e
commit
b516c681fe
+3
-1
@@ -797,7 +797,9 @@ std::string proc_self_dirname()
|
||||
path = (char *) realloc((void *) path, buflen);
|
||||
while (buflen > 0 && path[buflen-1] != '/')
|
||||
buflen--;
|
||||
return std::string(path, buflen);
|
||||
std::string str(path, buflen);
|
||||
free(path);
|
||||
return str;
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
std::string proc_self_dirname()
|
||||
|
||||
Reference in New Issue
Block a user