MCPcopy Create free account
hub / github.com/esnet/iperf / cJSON_Delete

Function cJSON_Delete

src/cjson.c:264–285  ·  view source on GitHub ↗

Delete a cJSON structure. */

Source from the content-addressed store, hash-verified

262
263/* Delete a cJSON structure. */
264CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)
265{
266 cJSON *next = NULL;
267 while (item != NULL)
268 {
269 next = item->next;
270 if (!(item->type & cJSON_IsReference) && (item->child != NULL))
271 {
272 cJSON_Delete(item->child);
273 }
274 if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
275 {
276 global_hooks.deallocate(item->valuestring);
277 }
278 if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
279 {
280 global_hooks.deallocate(item->string);
281 }
282 global_hooks.deallocate(item);
283 item = next;
284 }
285}
286
287/* get the decimal point character of the current locale */
288static unsigned char get_decimal_point(void)

Callers 15

parse_arrayFunction · 0.85
parse_objectFunction · 0.85
cJSON_AddNullToObjectFunction · 0.85
cJSON_AddTrueToObjectFunction · 0.85
cJSON_AddFalseToObjectFunction · 0.85
cJSON_AddBoolToObjectFunction · 0.85
cJSON_AddNumberToObjectFunction · 0.85
cJSON_AddStringToObjectFunction · 0.85
cJSON_AddRawToObjectFunction · 0.85
cJSON_AddObjectToObjectFunction · 0.85
cJSON_AddArrayToObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…