Fix minor memory leak
parent
266944c9d2
commit
472aadf9ab
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue