diff --git a/cJSON.c b/cJSON.c index 4f30e3a..f922ad6 100644 --- a/cJSON.c +++ b/cJSON.c @@ -239,8 +239,8 @@ static const char *skip(const char *in) {while (in && *in && (unsigned char)*in< /* Parse an object - create a new root, and populate. */ cJSON *cJSON_Parse(const char *value) { - ep=0; cJSON *c=cJSON_New_Item(); + ep=0; if (!c) return 0; /* memory fail */ if (!parse_value(c,skip(value))) {cJSON_Delete(c);return 0;}