Merge pull request #879 from janotomko/null

Handle NULL gracefully in json_tokener_free
This commit is contained in:
Eric Hawicz
2024-12-07 13:33:05 -05:00
committed by GitHub

View File

@@ -185,6 +185,8 @@ struct json_tokener *json_tokener_new(void)
void json_tokener_free(struct json_tokener *tok)
{
if (!tok)
return;
json_tokener_reset(tok);
if (tok->pb)
printbuf_free(tok->pb);