From fcdd85267db6a3f12a94712f86d93b488ee62c2c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 9 Dec 2011 11:04:14 +0100 Subject: [PATCH] jscript: Fixed memory leaks. --- dlls/jscript/engine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 63ae9d72067..6a76f8efe5b 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -1585,6 +1585,7 @@ static HRESULT interp_array(exec_ctx_t *ctx) } hres = to_string(ctx->parser->script, namev, &ctx->ei, &name); + VariantClear(namev); if(FAILED(hres)) { IDispatch_Release(obj); return hres; @@ -2701,6 +2702,8 @@ static HRESULT interp_postinc(exec_ctx_t *ctx) num_set_val(&inc, num_val(&n)+(double)arg); hres = disp_propput(ctx->parser->script, obj, id, &inc, &ctx->ei, NULL/*FIXME*/); } + if(FAILED(hres)) + VariantClear(&v); } IDispatch_Release(obj); if(FAILED(hres)) -- 2.11.4.GIT