Browse Source

Remove superfluous NULL checks

tags/json-c-0.13-20171207
Anmol Sarma 10 years ago
parent
commit
467102fa78
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      json_tokener.c

+ 2
- 2
json_tokener.c View File

@@ -131,7 +131,7 @@ void json_tokener_free(struct json_tokener *tok)
{ {
json_tokener_reset(tok); json_tokener_reset(tok);
if (tok->pb) printbuf_free(tok->pb); if (tok->pb) printbuf_free(tok->pb);
if (tok->stack) free(tok->stack);
free(tok->stack);
free(tok); free(tok);
} }


@@ -901,7 +901,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,


#ifdef HAVE_SETLOCALE #ifdef HAVE_SETLOCALE
setlocale(LC_NUMERIC, oldlocale); setlocale(LC_NUMERIC, oldlocale);
if (oldlocale) free(oldlocale);
free(oldlocale);
#endif #endif


if (tok->err == json_tokener_success) if (tok->err == json_tokener_success)


Loading…
Cancel
Save