Fixing a use after free
This commit is contained in:
parent
3fce1aae03
commit
e0054af96f
|
@ -3125,10 +3125,10 @@ SWITCH_DECLARE(switch_status_t) switch_live_array_clear(switch_live_array_t *la)
|
|||
|
||||
while(np) {
|
||||
cur = np;
|
||||
np = np->next;
|
||||
cJSON_Delete(cur->obj);
|
||||
free(cur->name);
|
||||
free(cur);
|
||||
np = np->next;
|
||||
}
|
||||
|
||||
la->head = la->tail = NULL;
|
||||
|
|
Loading…
Reference in New Issue