diff --git a/json_tokener.c b/json_tokener.c index c831f8a..4453c89 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -182,6 +182,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);