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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user