Resend: shdocvw: Make sure BSTR is allocated before calling sink

Cihan Altinay cihan.altinay at stud.tu-ilmenau.de
Tue Oct 17 09:55:14 CDT 2006


Last one was silently rejected.

-------------- next part --------------
>From 3814d1f107b8de4cc21389d84dd56cc21de87451 Mon Sep 17 00:00:00 2001
From: Cihan <cia at Koala.localdomain>
Date: Tue, 17 Oct 2006 16:53:04 +0200
Subject: 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..9f53d5a 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);
 }
-- 
1.4.2.3



More information about the wine-patches mailing list