Module: wine Branch: master Commit: 103ef913d175d9d29a751fb1a7d17b4cf9012c99 URL: http://source.winehq.org/git/wine.git/?a=commit;h=103ef913d175d9d29a751fb1a7...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Jan 20 11:49:12 2011 +0100
mshtml: Fixed some leaks in tests (valgrind).
---
dlls/mshtml/tests/activex.c | 1 + dlls/mshtml/tests/dom.c | 2 ++ dlls/mshtml/tests/events.c | 1 + 3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index d3cbb9d..bf3e2e9 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -471,6 +471,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper ok(hres == S_OK, "Read failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v)); ok(!strcmp_wa(V_BSTR(&v), "3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + SysFreeString(V_BSTR(&v));
V_VT(&v) = VT_I4; V_I4(&v) = 0xdeadbeef; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index f753b14..c883a70 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2909,6 +2909,7 @@ static IHTMLElement *_test_create_elem(unsigned line, IHTMLDocument2 *doc, const hres = IHTMLDocument2_createElement(doc, tmp, &elem); ok_(__FILE__,line) (hres == S_OK, "createElement failed: %08x\n", hres); ok_(__FILE__,line) (elem != NULL, "elem == NULL\n"); + SysFreeString(tmp);
return elem; } @@ -2927,6 +2928,7 @@ static IHTMLDOMNode *_test_create_text(unsigned line, IHTMLDocument2 *doc, const tmp = a2bstr(text); hres = IHTMLDocument3_createTextNode(doc3, tmp, &node); IHTMLDocument3_Release(doc3); + SysFreeString(tmp); ok_(__FILE__,line) (hres == S_OK, "createElement failed: %08x\n", hres); ok_(__FILE__,line) (node != NULL, "node == NULL\n");
diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index 7d69dd5..4be0212 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -986,6 +986,7 @@ static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, L else ok(0, "unexpected state %s\n", wine_dbgstr_w(str));
+ SysFreeString(str); IHTMLDocument2_Release(iframe_doc); IHTMLFrameBase2_Release(iframe); return S_OK;