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

List:       wine-devel
Subject:    Re: shdocvw: Make sure BSTR is allocated before calling sink
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2006-09-29 17:55:36
Message-ID: 451D5E18.6060402 () codeweavers ! com
[Download RAW message or body]

Hi Cihan,

Cihan Altinay wrote:
> This fixes bug 6054 and let's MSN Messenger 7 start up.
> http://bugs.winehq.org/show_bug.cgi?id=6054
>
> ---
>  dlls/shdocvw/dochost.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
> index 5bb40e0..8d78a49 100644
> --- a/dlls/shdocvw/dochost.c
> +++ b/dlls/shdocvw/dochost.c
> @@ -49,11 +49,12 @@ static void navigate_complete(DocHost *T
>      V_DISPATCH(params+1) = disp;
>
>      V_VT(&url) = VT_BSTR;
> -    V_BSTR(&url) = This->url;
> +    V_BSTR(&url) = SysAllocString(This->url);
>
>      call_sink(This->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams);
>      call_sink(This->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams);
>
> +    SysFreeString(This->url);
You should free V_BSTR(&url) here, not This->url.

Jacek


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

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