Jacek Caban : jscript: Fixed memory leaks.

Alexandre Julliard julliard at winehq.org
Fri Nov 25 10:27:32 CST 2011


Module: wine
Branch: master
Commit: 172fa4fa99873bb1a98e658c3cdba950044f0eb9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=172fa4fa99873bb1a98e658c3cdba950044f0eb9

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Nov 25 12:05:31 2011 +0100

jscript: Fixed memory leaks.

Spotted by Piotr.

---

 dlls/jscript/engine.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 3d9858d..e706407 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;
 




More information about the wine-cvs mailing list