Skip to content

Commit

Permalink
Merge pull request #722 from imaami/fix-json_tokener_new_ex-use-after…
Browse files Browse the repository at this point in the history
…-free

Fix use-after-free in json_tokener_new_ex()
  • Loading branch information
hawicz committed Sep 5, 2021
2 parents dc1ef7d + 9361d8d commit 4fc44f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json_tokener.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4fc44f3

Please sign in to comment.