Zhenbo Li : mshtml/tests: Fix a memory leak.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 27 15:20:55 CDT 2014
Module: wine
Branch: master
Commit: 334eedb09e4d55e68cd6de26144dc8ace33dc272
URL: http://source.winehq.org/git/wine.git/?a=commit;h=334eedb09e4d55e68cd6de26144dc8ace33dc272
Author: Zhenbo Li <litimetal at gmail.com>
Date: Wed Aug 27 15:19:38 2014 +0800
mshtml/tests: Fix a memory leak.
---
dlls/mshtml/tests/dom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 160a81e..03c3159 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -7041,8 +7041,10 @@ static void test_elems(IHTMLDocument2 *doc)
ok(hres == S_OK, "get_type failed: %08x\n", hres);
ok(type == NULL, "Unexpected type %s\n", wine_dbgstr_w(type));
- hres = IHTMLScriptElement_put_type (script, a2bstr ("text/javascript"));
+ type = a2bstr("text/javascript");
+ hres = IHTMLScriptElement_put_type (script, type);
ok(hres == S_OK, "put_type failed: %08x\n", hres);
+ SysFreeString(type);
hres = IHTMLScriptElement_get_type(script, &type);
ok(hres == S_OK, "get_type failed: %08x\n", hres);
ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", wine_dbgstr_w(type));
More information about the wine-cvs
mailing list