This is probably not an important memory leak, since it is only on a rare
error path, but it is best to fix it anyway.
Found with valgrind.
p->parse_state = new_state;
return node;
} else {
p->parse_state = new_state;
return node;
} else {
+ json_destroy(new_json);
json_error(p, "input exceeds maximum nesting depth %d",
JSON_MAX_HEIGHT);
return NULL;
json_error(p, "input exceeds maximum nesting depth %d",
JSON_MAX_HEIGHT);
return NULL;