Jacek Caban : jscript: Fixed BSTR leak.

Alexandre Julliard julliard at winehq.org
Tue Feb 19 13:33:04 CST 2013


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Feb 19 12:45:56 2013 +0100

jscript: Fixed BSTR leak.

---

 dlls/jscript/compile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index ad00591..c776c83 100644
--- a/dlls/jscript/compile.c
+++ b/dlls/jscript/compile.c
@@ -791,7 +791,7 @@ static HRESULT literal_as_bstr(compiler_ctx_t *ctx, literal_t *literal, BSTR *st
         if(FAILED(hres))
             return hres;
 
-        *str = SysAllocStringLen(jsstr->str, jsstr_length(jsstr));
+        *str = compiler_alloc_bstr(ctx, jsstr->str);
         jsstr_release(jsstr);
         break;
     }




More information about the wine-cvs mailing list