Hi André,

On 3/17/11 8:58 PM, André Hentschel wrote:
...don't leak path...
---
  dlls/urlmon/ftp.c |   16 ++++++++++++----
  1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c
index c9d43b8..a27d84c 100644
--- a/dlls/urlmon/ftp.c
+++ b/dlls/urlmon/ftp.c
@@ -59,22 +59,30 @@ static HRESULT FtpProtocol_open_request(Protocol *prot, 
IUri *uri, DWORD request
          HINTERNET internet_session, IInternetBindInfo *bind_info)
  {
      FtpProtocol *This = impl_from_Protocol(prot);
-    BSTR url;
+    DWORD path_size = INTERNET_MAX_URL_LENGTH;
+    BSTR url, path;
      HRESULT hres;

      hres = IUri_GetAbsoluteUri(uri,&url);
      if(FAILED(hres))
          return hres;
+    path = heap_alloc(path_size);
+    hres = UrlUnescapeW((LPWSTR)url, path,&path_size, 0);

It looks like using GetDisplayUri is what you need.

Jacek


Reply via email to