From e0054af96f13b86bf04cea1315295e27a00ea451 Mon Sep 17 00:00:00 2001 From: William King Date: Thu, 17 Oct 2013 22:27:34 -0700 Subject: [PATCH] Fixing a use after free --- src/switch_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_event.c b/src/switch_event.c index 36014ab921..0a0a532628 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -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;