From 172fa4fa99873bb1a98e658c3cdba950044f0eb9 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 25 Nov 2011 12:05:31 +0100 Subject: [PATCH] jscript: Fixed memory leaks. Spotted by Piotr. --- dlls/jscript/engine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 3d9858d8e9..e7064077f7 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2290,6 +2290,8 @@ HRESULT interp_add(exec_ctx_t *ctx) TRACE("%s + %s\n", debugstr_variant(l), debugstr_variant(r)); hres = add_eval(ctx->parser->script, l, r, &ctx->ei, &ret); + VariantClear(l); + VariantClear(r); if(FAILED(hres)) return hres; @@ -3362,6 +3364,7 @@ static HRESULT interp_tree(exec_ctx_t *ctx) return hres; hres = exprval_to_value(ctx->parser->script, &val, &ctx->ei, &v); + exprval_release(&val); if(FAILED(hres)) return hres;