mirror of
https://github.com/json-c/json-c.git
synced 2026-03-21 14:09:06 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user