mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-24 11:22:02 -05:00
Fix memory leak in Path::getDirectory.
This commit is contained in:
parent
daeeb5f827
commit
f58d711981
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue