1
0
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:
Øystein Dale
2018-07-18 00:57:37 +02:00
parent 934e53869c
commit 5744509b87

View File

@@ -354,7 +354,7 @@ private:
sb.Append(&c, 1);
}
}
return std::string(sb.GetString());
return sb.GetStdString();
}
std::string GetLine(size_t index)