shlwapi/tests: Avoid memory leaks (coverity).
This commit is contained in:
parent
799c2fb866
commit
9be5df10ae
@ -2272,7 +2272,7 @@ static const IServiceProviderVtbl IServiceProviderImpl_Vtbl =
|
||||
|
||||
static void test_IUnknown_QueryServiceExec(void)
|
||||
{
|
||||
IServiceProvider *provider = IServiceProviderImpl_Construct();
|
||||
IServiceProvider *provider;
|
||||
static const GUID dummy_serviceid = { 0xdeadbeef };
|
||||
static const GUID dummy_groupid = { 0xbeefbeef };
|
||||
call_trace_t trace_expected;
|
||||
@ -2286,6 +2286,8 @@ static void test_IUnknown_QueryServiceExec(void)
|
||||
return;
|
||||
}
|
||||
|
||||
provider = IServiceProviderImpl_Construct();
|
||||
|
||||
/* null source pointer */
|
||||
hr = pIUnknown_QueryServiceExec(NULL, &dummy_serviceid, &dummy_groupid, 0, 0, 0, 0);
|
||||
ok(hr == E_FAIL, "got 0x%08x\n", hr);
|
||||
@ -2384,8 +2386,8 @@ static const IProfferServiceVtbl IProfferServiceImpl_Vtbl =
|
||||
|
||||
static void test_IUnknown_ProfferService(void)
|
||||
{
|
||||
IServiceProvider *provider = IServiceProviderImpl_Construct();
|
||||
IProfferService *proff = IProfferServiceImpl_Construct();
|
||||
IServiceProvider *provider;
|
||||
IProfferService *proff;
|
||||
static const GUID dummy_serviceid = { 0xdeadbeef };
|
||||
call_trace_t trace_expected;
|
||||
HRESULT hr;
|
||||
@ -2399,6 +2401,9 @@ static void test_IUnknown_ProfferService(void)
|
||||
return;
|
||||
}
|
||||
|
||||
provider = IServiceProviderImpl_Construct();
|
||||
proff = IProfferServiceImpl_Construct();
|
||||
|
||||
/* null source pointer */
|
||||
hr = pIUnknown_ProfferService(NULL, &dummy_serviceid, 0, 0);
|
||||
ok(hr == E_FAIL, "got 0x%08x\n", hr);
|
||||
|
@ -1082,10 +1082,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
|
||||
HRESULT hr;
|
||||
CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH];
|
||||
WCHAR wszReturnUrl[INTERNET_MAX_URL_LENGTH];
|
||||
LPWSTR wszUrl1 = GetWideString(szUrl1);
|
||||
LPWSTR wszUrl2 = GetWideString(szUrl2);
|
||||
LPWSTR wszExpectUrl = GetWideString(szExpectUrl);
|
||||
LPWSTR wszConvertedUrl;
|
||||
LPWSTR wszUrl1, wszUrl2, wszExpectUrl, wszConvertedUrl;
|
||||
|
||||
DWORD dwSize;
|
||||
DWORD dwExpectLen = lstrlenA(szExpectUrl);
|
||||
@ -1095,6 +1092,10 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
|
||||
return;
|
||||
}
|
||||
|
||||
wszUrl1 = GetWideString(szUrl1);
|
||||
wszUrl2 = GetWideString(szUrl2);
|
||||
wszExpectUrl = GetWideString(szExpectUrl);
|
||||
|
||||
hr = pUrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags);
|
||||
ok(hr == E_INVALIDARG, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user