browseui: Fix several memory leaks in the tests.
Found by Valgrind.
This commit is contained in:
parent
663e11b256
commit
f75981c712
|
@ -219,6 +219,7 @@ IACListVtbl TestACL_ACListVtbl =
|
||||||
ole_ok(obj->lpVtbl->Next(obj, 1, &wstr, &i)); \
|
ole_ok(obj->lpVtbl->Next(obj, 1, &wstr, &i)); \
|
||||||
ok(i == 1, "Expected i == 1, got %d\n", i); \
|
ok(i == 1, "Expected i == 1, got %d\n", i); \
|
||||||
ok(str[0] == wstr[0], "String mismatch\n"); \
|
ok(str[0] == wstr[0], "String mismatch\n"); \
|
||||||
|
CoTaskMemFree(wstr); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define expect_end(obj) \
|
#define expect_end(obj) \
|
||||||
|
@ -280,9 +281,13 @@ static void test_ACLMulti(void)
|
||||||
|
|
||||||
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
||||||
ok(i == 1, "Expected i == 1, got %d\n", i);
|
ok(i == 1, "Expected i == 1, got %d\n", i);
|
||||||
|
CoTaskMemFree(wstrtab[0]);
|
||||||
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
||||||
|
CoTaskMemFree(wstrtab[0]);
|
||||||
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
||||||
|
CoTaskMemFree(wstrtab[0]);
|
||||||
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i));
|
||||||
|
CoTaskMemFree(wstrtab[0]);
|
||||||
ole_ok(acl->lpVtbl->Expand(acl, exp));
|
ole_ok(acl->lpVtbl->Expand(acl, exp));
|
||||||
ok(acl1->expcount == 2, "expcount - expected 1, got %d\n", acl1->expcount);
|
ok(acl1->expcount == 2, "expcount - expected 1, got %d\n", acl1->expcount);
|
||||||
ok(acl2->expcount == 0 /* XP */ || acl2->expcount == 2 /* Vista */,
|
ok(acl2->expcount == 0 /* XP */ || acl2->expcount == 2 /* Vista */,
|
||||||
|
|
Loading…
Reference in New Issue