From: kramm Date: Mon, 24 Nov 2008 16:12:06 +0000 (+0000) Subject: mem leak fixes X-Git-Tag: release-0-9-0~771 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=cecf84b4cc9ba4d47beaac8adac6ba727c4a04dd mem leak fixes --- 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++) {