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 authored and GitHub committed 2021-09-04 23:16:13 -04:00
commit 4fc44f32df
1 file changed
+1 -1
+1 -1
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;