Jacek Caban : jscript: Fixed memory leaks.

Alexandre Julliard julliard at winehq.org
Fri Dec 9 14:41:37 CST 2011


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Dec  9 11:04:14 2011 +0100

jscript: Fixed memory leaks.

---

 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 63ae9d7..6a76f8e 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))




More information about the wine-cvs mailing list