[1/5] jscript: Implement the String.anchor() method (resend).

Jacek Caban jacek at codeweavers.com
Tue Dec 16 07:48:37 CST 2008


Hi Andrew,

Andrew Nguyen wrote:
> This revision incorporates Jacek Caban's suggestions.
> ---
>  dlls/jscript/string.c     |   55 +++++++++++++++++++++++++++++++++++++++++++-
>  dlls/jscript/tests/api.js |   17 ++++++++++++++
>  2 files changed, 70 insertions(+), 2 deletions(-)
>   

+        if(ret) {
+            sprintfW(ret, attrtagfmtW, tagname, attrname, (attrval ? attrval : undefinedW), string->str, tagname);
+
+            V_VT(retv) = VT_BSTR;
+            V_BSTR(retv) = ret;
+
+            SysFreeString(attrval);


It looks for me much better now, but you leak attrval if retv is NULL or 
SysAllocStringLen fails. SysFreeString call should be moved just before 
the last return.

Jacek



More information about the wine-devel mailing list