Fix minor memory leak

modernize-cmake-1
MrSimbax 2019-02-25 23:42:34 +01:00
parent 266944c9d2
commit 472aadf9ab
1 changed files with 5 additions and 1 deletions

View File

@ -180,7 +180,11 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte
std::string CSystemUtils::GetBasePath() std::string CSystemUtils::GetBasePath()
{ {
if (m_basePath.empty()) if (m_basePath.empty())
m_basePath = SDL_GetBasePath(); {
auto* path = SDL_GetBasePath();
m_basePath = path;
SDL_free(path);
}
return m_basePath; return m_basePath;
} }