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 committed 2020-10-06 18:20:37 -03:00
1 parent e53cde1d5d
commit 8e73dfd440
1 file changed
+1
+1
View File
@@ -472,6 +472,7 @@ namespace ObjectFactory
result->ReadJson(&readContext, jRoot);
if (readContext.WasError())
{
delete result;
throw std::runtime_error("Object has errors");
}