About: msxml3: Partially implement ::setAttributeNode()

Nikolay Sivov bunglehead at gmail.com
Mon Oct 18 09:25:38 CDT 2010


  On 10/18/2010 18:21, Joris Huizer wrote:
> Hello,
>
> In proposed patch msxml3: Partially implement ::setAttributeNode()
> I think I found a little possible memory leak:
>
> +    name = xmlChar_from_wchar(nameW);
> +    value = xmlChar_from_wchar(V_BSTR(&valueW));
> +
> +    if (!name || !value)
> +    {
> +        SysFreeString(nameW);
> +        VariantClear(&valueW);
> +        return E_OUTOFMEMORY;
> +    }
>
> Wouldn't you need to free memory allocated for both name and value, in case one of the allocations succeeded ?
Yes, I already spotted this, will resend whole set anyway.
> HTH,
> Joris




More information about the wine-devel mailing list