1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix possible memory leak in CreateObjectFromJson

As reported by PVS-Studio. Warning: V773.

Fix 1/7.

Issue: 12523
This commit is contained in:
Vinicius Sa
2020-10-02 13:41:19 -03:00
parent e53cde1d5d
commit 8e73dfd440

View File

@@ -472,6 +472,7 @@ namespace ObjectFactory
result->ReadJson(&readContext, jRoot);
if (readContext.WasError())
{
delete result;
throw std::runtime_error("Object has errors");
}