mshtml: Handle the failure case in get_nsstyle_attr.

Jacek Caban jacek at codeweavers.com
Mon Jul 18 04:39:00 CDT 2011


Hi Gerald,

On 07/15/11 22:49, Gerald Pfeifer wrote:
> ---
>  dlls/mshtml/htmlstyle.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
> index cd1f6b5..3e76e61 100644
> --- a/dlls/mshtml/htmlstyle.c
> +++ b/dlls/mshtml/htmlstyle.c
> @@ -468,6 +468,8 @@ HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR
>  
>      nsAString_GetData(&str_value, &value);
>      hres = nsstyle_to_bstr(value, flags, p);
> +    if( FAILED(hres) )
> +        return hres;
>      nsAString_Finish(&str_value); 

Good catch, but you add a leak here.

Jacek



More information about the wine-devel mailing list