Fixing a use after free

This commit is contained in:
William King 2013-10-17 22:27:34 -07:00
parent 3fce1aae03
commit e0054af96f
1 changed files with 1 additions and 1 deletions

View File

@ -3125,10 +3125,10 @@ SWITCH_DECLARE(switch_status_t) switch_live_array_clear(switch_live_array_t *la)
while(np) { while(np) {
cur = np; cur = np;
np = np->next;
cJSON_Delete(cur->obj); cJSON_Delete(cur->obj);
free(cur->name); free(cur->name);
free(cur); free(cur);
np = np->next;
} }
la->head = la->tail = NULL; la->head = la->tail = NULL;