Module: wine Branch: master Commit: d1a40539539883c56203743c16731734d2ad72fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=d1a40539539883c56203743c16...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Apr 25 11:25:44 2012 +0200
jscript: Fixed func->funcs leak.
---
dlls/jscript/compile.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 5d162ea..8bb397d 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1812,9 +1812,10 @@ static HRESULT compile_function(compiler_ctx_t *ctx, source_elements_t *source,
func->expr = func_expr;
- func->funcs = heap_alloc_zero(func->func_cnt * sizeof(*func->funcs)); + func->funcs = compiler_alloc(ctx->code, func->func_cnt * sizeof(*func->funcs)); if(!func->funcs) return E_OUTOFMEMORY; + memset(func->funcs, 0, func->func_cnt * sizeof(*func->funcs));
for(iter = source->functions, i=0; iter; iter = iter->next, i++) { hres = compile_function(ctx, iter->expr->source_elements, iter->expr, FALSE, func->funcs+i);