Module: wine Branch: master Commit: 6ab3ba13738ed1c948493d790c9b7423267376a7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6ab3ba13738ed1c948493d790c...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Aug 28 10:42:03 2013 +0200
oleaut32: Fix memory leaks in typelib tests.
---
dlls/oleaut32/tests/typelib.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index bc759c0..57e289a 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -3131,12 +3131,14 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); + SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, sizeof(names) / sizeof(*names), &cnames); ok(hres == S_OK, "got: %08x\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); + SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 10, &pfuncdesc); @@ -3250,6 +3252,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(hres == S_OK, "got: %08x\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); + SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 13, &pfuncdesc); @@ -4825,6 +4828,7 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, break; }
+ ITypeInfo_ReleaseTypeAttr(ti, typeattr); ITypeInfo_Release(ti); }