From: William King Date: Fri, 18 Oct 2013 05:27:34 +0000 (-0700) Subject: Fixing a use after free X-Git-Tag: v1.4.1~11^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0054af96f13b86bf04cea1315295e27a00ea451;p=thirdparty%2Ffreeswitch.git Fixing a use after free --- 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;