Merge some old work to include (some of) PR #464 into the current master branch.

This commit is contained in:
Eric Haszlakiewicz
2021-07-25 19:07:06 +00:00
27 changed files with 275 additions and 111 deletions

View File

@@ -155,6 +155,12 @@ struct json_tokener *json_tokener_new_ex(int depth)
return NULL;
}
tok->pb = printbuf_new();
if (!tok->pb)
{
free(tok);
free(tok->stack);
return NULL;
}
tok->max_depth = depth;
json_tokener_reset(tok);
return tok;