Piotr Caban : urlmon: Store display_uri in BindProtocol structure.

Alexandre Julliard julliard at winehq.org
Fri Jan 20 13:09:30 CST 2012


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Jan 20 14:52:16 2012 +0100

urlmon: Store display_uri in BindProtocol structure.

---

 dlls/urlmon/bindprot.c    |    8 +++-----
 dlls/urlmon/urlmon_main.h |    1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c
index 7c2aca6..aef74fc 100644
--- a/dlls/urlmon/bindprot.c
+++ b/dlls/urlmon/bindprot.c
@@ -342,6 +342,7 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface)
             IInternetProtocol_Release(&This->filter_proxy->IInternetProtocol_iface);
         if(This->uri)
             IUri_Release(This->uri);
+        SysFreeString(This->display_uri);
 
         set_binding_sink(This, NULL, NULL);
 
@@ -546,15 +547,12 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
                 &This->IInternetBindInfo_iface, 0, NULL);
         IInternetProtocolEx_Release(protocolex);
     }else {
-        BSTR display_uri;
-
-        hres = IUri_GetDisplayUri(pUri, &display_uri);
+        hres = IUri_GetDisplayUri(pUri, &This->display_uri);
         if(FAILED(hres))
             return hres;
 
-        hres = IInternetProtocol_Start(protocol, display_uri, &This->IInternetProtocolSink_iface,
+        hres = IInternetProtocol_Start(protocol, This->display_uri, &This->IInternetProtocolSink_iface,
                 &This->IInternetBindInfo_iface, 0, 0);
-        SysFreeString(display_uri);
     }
 
     return hres;
diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h
index a185f10..28723e1 100644
--- a/dlls/urlmon/urlmon_main.h
+++ b/dlls/urlmon/urlmon_main.h
@@ -211,6 +211,7 @@ typedef struct {
     DWORD buf_size;
     LPWSTR mime;
     IUri *uri;
+    BSTR display_uri;
     ProtocolProxy *filter_proxy;
 }  BindProtocol;
 




More information about the wine-cvs mailing list