mshtml: Use the correct deallocator in the htmldoc tests for the memory returned by IMoniker_GetDisplayName and fix a use-after-free error.
This commit is contained in:
parent
3328ad6eb9
commit
1c28273686
|
@ -2506,7 +2506,7 @@ static void test_GetCurMoniker(IUnknown *unk, IMoniker *exmon, LPCWSTR exurl)
|
|||
IPersistMoniker_Release(permon);
|
||||
|
||||
if(exmon) {
|
||||
BSTR url;
|
||||
LPOLESTR url;
|
||||
BOOL exb = expect_GetDisplayName;
|
||||
BOOL clb = called_GetDisplayName;
|
||||
|
||||
|
@ -2520,10 +2520,10 @@ static void test_GetCurMoniker(IUnknown *unk, IMoniker *exmon, LPCWSTR exurl)
|
|||
expect_GetDisplayName = exb;
|
||||
called_GetDisplayName = clb;
|
||||
|
||||
SysFreeString(url);
|
||||
ok(!lstrcmpW(url, doc_url), "url != doc_url\n");
|
||||
CoTaskMemFree(url);
|
||||
}else if(exurl) {
|
||||
BSTR url;
|
||||
LPOLESTR url;
|
||||
|
||||
ok(hres == S_OK, "GetCurrentMoniker failed: %08x\n", hres);
|
||||
|
||||
|
@ -2533,7 +2533,7 @@ static void test_GetCurMoniker(IUnknown *unk, IMoniker *exmon, LPCWSTR exurl)
|
|||
ok(!lstrcmpW(url, exurl), "unexpected url\n");
|
||||
ok(!lstrcmpW(url, doc_url), "url != doc_url\n");
|
||||
|
||||
SysFreeString(url);
|
||||
CoTaskMemFree(url);
|
||||
}else {
|
||||
ok(hres == E_UNEXPECTED,
|
||||
"GetCurrentMoniker failed: %08x, expected E_UNEXPECTED\n", hres);
|
||||
|
|
Loading…
Reference in New Issue