mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Fix memory leak in config
Assigning a pointer to std::string appears to only perform a copy and does not transfer ownership of the pointer, thus the allocated memory is will never be freed. Use StringBuilder::GetStdString() to avoid the memory leak.
This commit is contained in:
@@ -354,7 +354,7 @@ private:
|
||||
sb.Append(&c, 1);
|
||||
}
|
||||
}
|
||||
return std::string(sb.GetString());
|
||||
return sb.GetStdString();
|
||||
}
|
||||
|
||||
std::string GetLine(size_t index)
|
||||
|
||||
Reference in New Issue
Block a user