[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: mshtml: Added IHTMLTable::width property implementation. (try 5)
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2014-04-28 8:38:41
Message-ID: 535E1391.1020804 () codeweavers ! com
[Download RAW message or body]

Hi Zhenbo,

This looks better, but there are two more things I didn't catch earlier.

On 04/27/14 15:08, Zhenbo Li wrote:
> +    nsres = nsIDOMHTMLTableElement_GetWidth(This->nstable, &val);
> +    if (NS_FAILED(nsres)){
> +        ERR("Get Width(%s) failed!\n", debugstr_variant(p));

You can't access output argument (p) here. This will be undefined.

> +        nsAString_Finish(&val);
> +        return E_FAIL;
> +    }
> +
> +    hres = nsstr_to_truncated_bstr(&val, &bstr);
> +
> +    V_VT(p) = VT_BSTR;
> +    V_BSTR(p) = bstr;
> +    return hres;

You leak val here.

Jacek


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic