Cihan Altinay : shdocvw: Make sure BSTR is allocated before calling sink.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Oct 18 07:38:48 CDT 2006


Module: wine
Branch: master
Commit: 545b13a733734b46ca87589ecef9172e9cffab0a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=545b13a733734b46ca87589ecef9172e9cffab0a

Author: Cihan Altinay <bobbyg at gmx.net>
Date:   Tue Oct 17 16:56:21 2006 +0200

shdocvw: Make sure BSTR is allocated before calling sink.

---

 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 0f6ef4e..834788f 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(V_BSTR(&url));
     if(disp)
         IDispatch_Release(disp);
 }




More information about the wine-cvs mailing list