mshtml: Don't free string that will be cleared by SafeArrayDestroy.
This commit is contained in:
parent
50b76b76cb
commit
645f34ddeb
dlls/mshtml/tests
|
@ -5693,7 +5693,6 @@ static void doc_write(IHTMLDocument2 *doc, BOOL ln, const char *text)
|
||||||
SAFEARRAYBOUND dim;
|
SAFEARRAYBOUND dim;
|
||||||
SAFEARRAY *sa;
|
SAFEARRAY *sa;
|
||||||
VARIANT *var;
|
VARIANT *var;
|
||||||
BSTR str;
|
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
dim.lLbound = 0;
|
dim.lLbound = 0;
|
||||||
|
@ -5701,7 +5700,7 @@ static void doc_write(IHTMLDocument2 *doc, BOOL ln, const char *text)
|
||||||
sa = SafeArrayCreate(VT_VARIANT, 1, &dim);
|
sa = SafeArrayCreate(VT_VARIANT, 1, &dim);
|
||||||
SafeArrayAccessData(sa, (void**)&var);
|
SafeArrayAccessData(sa, (void**)&var);
|
||||||
V_VT(var) = VT_BSTR;
|
V_VT(var) = VT_BSTR;
|
||||||
V_BSTR(var) = str = a2bstr(text);
|
V_BSTR(var) = a2bstr(text);
|
||||||
SafeArrayUnaccessData(sa);
|
SafeArrayUnaccessData(sa);
|
||||||
|
|
||||||
if(ln)
|
if(ln)
|
||||||
|
@ -5710,7 +5709,6 @@ static void doc_write(IHTMLDocument2 *doc, BOOL ln, const char *text)
|
||||||
hres = IHTMLDocument2_write(doc, sa);
|
hres = IHTMLDocument2_write(doc, sa);
|
||||||
ok(hres == S_OK, "write failed: %08x\n", hres);
|
ok(hres == S_OK, "write failed: %08x\n", hres);
|
||||||
|
|
||||||
SysFreeString(str);
|
|
||||||
SafeArrayDestroy(sa);
|
SafeArrayDestroy(sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue