From cecf84b4cc9ba4d47beaac8adac6ba727c4a04dd Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 24 Nov 2008 16:12:06 +0000 Subject: [PATCH] mem leak fixes --- lib/as3/abc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/as3/abc.c b/lib/as3/abc.c index d545a98..d03977d 100644 --- a/lib/as3/abc.c +++ b/lib/as3/abc.c @@ -857,6 +857,16 @@ void swf_WriteABC(TAG*abctag, void*code) for(t=0;tmethod_bodies->num;t++) { abc_method_body_t*m = (abc_method_body_t*)array_getvalue(file->method_bodies, t); m->index = t; + exception_list_t*ee = m->exceptions; + while(ee) { + exception_t*e=ee->exception;ee->exception=0; + e->from = e->to = e->target = 0; + multiname_destroy(e->exc_type);e->exc_type=0; + multiname_destroy(e->var_name);e->var_name=0; + free(e); + ee=ee->next; + } + list_free(m->exceptions);m->exceptions=0; } for(t=0;tmethods->num;t++) { -- 1.7.10.4