rapidjson
rapidjson copied to clipboard
fix missing check allocator is reference in ClearStack()
ClearStack() function in document.h misses check allocator type. This would cause memory leak if parse failed. Such as following code:
int main()
{
if (1) {
rapidjson::Document doc;
auto& ret = doc.Parse<0>(R"(
{"a":"a","b":"b"}, {"c":"c"}
)");
}
return 0;
}