Merge pull request #722 from imaami/fix-json_tokener_new_ex-use-after-free

Fix use-after-free in json_tokener_new_ex()
This commit is contained in:
Eric Hawicz
2021-09-04 23:16:13 -04:00
committed by GitHub

View File

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