Remove superfluous NULL checks

This commit is contained in:
Anmol Sarma
2015-10-01 14:14:03 +05:30
parent f37b0a10a5
commit 467102fa78

View File

@@ -131,7 +131,7 @@ void json_tokener_free(struct json_tokener *tok)
{
json_tokener_reset(tok);
if (tok->pb) printbuf_free(tok->pb);
if (tok->stack) free(tok->stack);
free(tok->stack);
free(tok);
}
@@ -901,7 +901,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
#ifdef HAVE_SETLOCALE
setlocale(LC_NUMERIC, oldlocale);
if (oldlocale) free(oldlocale);
free(oldlocale);
#endif
if (tok->err == json_tokener_success)