From: Alex Henrie alexhenrie24@gmail.com
--- dlls/urlmon/tests/misc.c | 5 ++- dlls/urlmon/tests/protocol.c | 5 ++- dlls/urlmon/tests/sec_mgr.c | 5 ++- dlls/urlmon/tests/uri.c | 61 ++++++++++++++++++------------------ 4 files changed, 36 insertions(+), 40 deletions(-)
diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index 4cd64749b1d..796f54a4f62 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -30,7 +30,6 @@ #include "urlmon.h"
#include "initguid.h" -#include "wine/heap.h"
DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
@@ -1497,7 +1496,7 @@ static void test_user_agent(void) ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08lx\n", hres); ok(size > 0, "size=%ld, expected non-zero\n", size);
- str2 = HeapAlloc(GetProcessHeap(), 0, (size+20)*sizeof(CHAR)); + str2 = malloc(size + 20); saved = size; hres = pObtainUserAgentString(0, str2, &size); ok(hres == S_OK, "ObtainUserAgentString failed: %08lx\n", hres); @@ -1681,7 +1680,7 @@ static void test_user_agent(void) hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, 0); ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08lx\n", hres);
- HeapFree(GetProcessHeap(), 0, str2); + free(str2); }
static void test_MkParseDisplayNameEx(void) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index e2db124f21e..ead7bbd2e70 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -20,7 +20,6 @@ #define CONST_VTABLE
#include <wine/test.h> -#include <wine/heap.h> #include <stdarg.h> #include <stdio.h>
@@ -2331,7 +2330,7 @@ static ULONG WINAPI ProtocolUnk_Release(IUnknown *iface) if(This->outer_ref) trace("outer_ref %ld\n", This->outer_ref); CHECK_EXPECT(Protocol_destructor); - heap_free(This); + free(This); } return ref; } @@ -2643,7 +2642,7 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown } }
- ret = heap_alloc(sizeof(*ret)); + ret = malloc(sizeof(*ret)); ret->IUnknown_inner.lpVtbl = &ProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &ProtocolVtbl; ret->IInternetPriority_iface.lpVtbl = &InternetPriorityVtbl; diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c index 2f1844ca8e8..debd1e9ebc5 100644 --- a/dlls/urlmon/tests/sec_mgr.c +++ b/dlls/urlmon/tests/sec_mgr.c @@ -32,7 +32,6 @@ #include "urlmon.h"
#include "initguid.h" -#include <wine/heap.h>
#define URLZONE_CUSTOM URLZONE_USER_MIN+1 #define URLZONE_CUSTOM2 URLZONE_CUSTOM+1 @@ -201,7 +200,7 @@ static LONG myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) if (dwMaxLen > ARRAY_SIZE(szNameBuf)) { /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(CHAR)))) + if (!(lpszName = malloc(dwMaxLen))) { ret = ERROR_NOT_ENOUGH_MEMORY; goto cleanup; @@ -235,7 +234,7 @@ static LONG myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) cleanup: /* Free buffer if allocated */ if (lpszName != szNameBuf) - heap_free(lpszName); + free(lpszName); if(lpszSubKey) RegCloseKey(hSubKey); return ret; diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index e6663a39641..cc6f5796fdd 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -33,7 +33,6 @@ #include "wininet.h" #include "strsafe.h" #include "initguid.h" -#include <wine/heap.h>
DEFINE_GUID(CLSID_CUri, 0xDF2FCE13, 0x25EC, 0x45BB, 0x9D,0x4C, 0xCE,0xCD,0x47,0xC2,0x43,0x0C);
@@ -7740,7 +7739,7 @@ static inline LPWSTR a2w(LPCSTR str) {
if(str) { DWORD len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); - ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + ret = malloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_UTF8, 0, str, -1, ret, len); }
@@ -7750,7 +7749,7 @@ static inline LPWSTR a2w(LPCSTR str) { static inline DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB) { LPWSTR strAW = a2w(strA); DWORD ret = lstrcmpW(strAW, strB); - heap_free(strAW); + free(strAW); return ret; }
@@ -7826,7 +7825,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr trace("Unsupported operation for %d on uri_builder_tests[%ld].\n", prop->property, test_index); }
- heap_free(valueW); + free(valueW); }
/* @@ -7888,7 +7887,7 @@ static void test_CreateUri_InvalidUri(void) { hr, E_INVALIDARG, i); if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -7964,7 +7963,7 @@ static void test_IUri_GetPropertyBSTR(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8018,7 +8017,7 @@ static void test_IUri_GetPropertyDWORD(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8280,7 +8279,7 @@ static void test_IUri_GetStrProperties(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8369,7 +8368,7 @@ static void test_IUri_GetDwordProperties(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8416,7 +8415,7 @@ static void test_IUri_GetPropertyLength(void) { /* Value may be unicode encoded */ expectedValueW = a2w(prop.value); expectedLen = lstrlenW(expectedValueW); - heap_free(expectedValueW); + free(expectedValueW);
/* This won't be necessary once GetPropertyLength is implemented. */ receivedLen = -1; @@ -8436,7 +8435,7 @@ static void test_IUri_GetPropertyLength(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8509,7 +8508,7 @@ static void test_IUri_GetProperties(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8562,7 +8561,7 @@ static void test_IUri_HasProperty(void) {
if(uri) IUri_Release(uri);
- heap_free(uriW); + free(uriW); } }
@@ -8855,8 +8854,8 @@ static void test_IUri_IsEqual(void) { if(uriA) IUri_Release(uriA); if(uriB) IUri_Release(uriB);
- heap_free(uriA_W); - heap_free(uriB_W); + free(uriA_W); + free(uriB_W); } }
@@ -8927,8 +8926,8 @@ static void test_CreateUriWithFragment(void) { }
if(uri) IUri_Release(uri); - heap_free(uriW); - heap_free(fragW); + free(uriW); + free(fragW); } }
@@ -10142,7 +10141,7 @@ static void test_IUriBuilder(void) { } if(builder) IUriBuilder_Release(builder); if(uri) IUri_Release(uri); - heap_free(uriW); + free(uriW); } }
@@ -10469,7 +10468,7 @@ static void test_IUriBuilder_RemoveProperties(void) { if(builder) IUriBuilder_Release(builder); } if(uri) IUri_Release(uri); - heap_free(uriW); + free(uriW); } }
@@ -10676,10 +10675,10 @@ static void test_CoInternetCombineIUri(void) { if(result) IUri_Release(result); } if(relative) IUri_Release(relative); - heap_free(relativeW); + free(relativeW); } if(base) IUri_Release(base); - heap_free(baseW); + free(baseW); } }
@@ -10963,10 +10962,10 @@ static void test_CoInternetCombineUrlEx(void) { } } if(result) IUri_Release(result); - heap_free(relativeW); + free(relativeW); } if(base) IUri_Release(base); - heap_free(baseW); + free(baseW); } }
@@ -11067,13 +11066,13 @@ static void test_CoInternetParseIUri_InvalidArgs(void) {
/* a long url that causes a crash on Wine */ len = INTERNET_MAX_URL_LENGTH*2; - longurl = heap_alloc((len+1)*sizeof(WCHAR)); + longurl = malloc((len + 1) * sizeof(WCHAR)); memcpy(longurl, http_urlW, sizeof(http_urlW)); for(i = ARRAY_SIZE(http_urlW)-1; i < len; i++) longurl[i] = 'x'; longurl[len] = 0;
- copy = heap_alloc((len+1)*sizeof(WCHAR)); + copy = malloc((len + 1) * sizeof(WCHAR)); memcpy(copy, longurl, (len+1)*sizeof(WCHAR));
hr = pCreateUri(longurl, 0, 0, &uri); @@ -11088,8 +11087,8 @@ static void test_CoInternetParseIUri_InvalidArgs(void) { ok(result == len, "Error: Expected 'result' to be %ld, but was %ld instead.\n", len, result); } - heap_free(longurl); - heap_free(copy); + free(longurl); + free(copy); if(uri) IUri_Release(uri); }
@@ -11129,7 +11128,7 @@ static void test_CoInternetParseIUri(void) { } } if(uri) IUri_Release(uri); - heap_free(uriW); + free(uriW); } }
@@ -11355,8 +11354,8 @@ static void test_CreateURLMoniker(void) IMoniker_Release(mon);
IUri_Release(uri); - heap_free(url); - heap_free(base_url); + free(url); + free(base_url); if(base_uri) IUri_Release(base_uri); if(base_mon) @@ -11606,7 +11605,7 @@ static void test_IPersistStream(void) IMarshal_Release(marshal); IStream_Release(stream); IUri_Release(uri); - heap_free(uriW); + free(uriW); } }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=139581
Your paranoid android.
=== w1064v1507 (32 bit report) ===
urlmon: protocol.c:894: Test failed: unexpected call ReportProgress_FINDINGRESOURCE protocol.c:898: Test failed: unexpected call ReportProgress_CONNECTING
This merge request was approved by Jacek Caban.