Jacek Caban : urlmon: Fixed accept_mimes freeing.

Alexandre Julliard julliard at winehq.org
Tue Jan 5 11:37:50 CST 2010


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jan  4 19:16:20 2010 +0100

urlmon: Fixed accept_mimes freeing.

---

 dlls/urlmon/http.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index 15344e2..fc0b8c4 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -79,7 +79,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD requ
     URL_COMPONENTSW url_comp;
     BYTE security_id[512];
     DWORD len = 0;
-    ULONG num = 0;
+    ULONG num;
     BOOL res, b;
     HRESULT hres;
 
@@ -132,8 +132,8 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD requ
                 ? wszBindVerb[This->base.bind_info.dwBindVerb] : This->base.bind_info.szCustomVerb,
             path, NULL, NULL, (LPCWSTR *)accept_mimes, request_flags, (DWORD_PTR)&This->base);
     heap_free(path);
-    while (num<sizeof(accept_mimes)/sizeof(accept_mimes[0]) && accept_mimes[num])
-        CoTaskMemFree(accept_mimes[num++]);
+    while(num--)
+        CoTaskMemFree(accept_mimes[num]);
     if (!This->base.request) {
         WARN("HttpOpenRequest failed: %d\n", GetLastError());
         return INET_E_RESOURCE_NOT_FOUND;




More information about the wine-cvs mailing list