1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Fix memory leak in Path::getDirectory.

This commit is contained in:
ceeac
2017-05-26 10:04:13 +02:00
parent daeeb5f827
commit f58d711981

View File

@@ -44,7 +44,10 @@ namespace Path
std::string GetDirectory(const std::string &path)
{
return GetDirectory(path.c_str());
const utf8* directory = GetDirectory(path.c_str());
std::string result(directory);
Memory::Free(directory);
return result;
}
utf8 * GetDirectory(const utf8 * path)