Fix memory leak in Path::getDirectory.

This commit is contained in:
ceeac 2017-05-26 10:04:13 +02:00
parent daeeb5f827
commit f58d711981
1 changed files with 4 additions and 1 deletions

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)