MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / cJSON_Delete

Function cJSON_Delete

modules/freeswitch/esl/src/esl_json.c:96–108  ·  view source on GitHub ↗

Delete a cJSON structure. */

Source from the content-addressed store, hash-verified

94
95/* Delete a cJSON structure. */
96ESL_DECLARE(void)cJSON_Delete(cJSON *c)
97{
98 cJSON *next;
99 while (c)
100 {
101 next=c->next;
102 if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);
103 if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
104 if (c->string) cJSON_free(c->string);
105 cJSON_free(c);
106 c=next;
107 }
108}
109
110/* Parse the input text to generate a number, and populate the result into item. */
111static const char *parse_number(cJSON *item,const char *num)

Callers 15

cJSON_ParseFunction · 0.70
cJSON_ReplaceItemInArrayFunction · 0.70
esl_event_create_jsonFunction · 0.70
esl_event_serialize_jsonFunction · 0.70
free_mi_request_parsedFunction · 0.50
_init_mi_resultFunction · 0.50
init_mi_error_extraFunction · 0.50
free_mi_responseFunction · 0.50
free_shm_mi_responseFunction · 0.50
free_shm_mi_itemFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected