oledb32/tests: Free returned property set memory.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36312
This commit is contained in:
Alistair Leslie-Hughes 2022-09-18 12:12:44 +10:00 committed by Alexandre Julliard
parent e04a406a0a
commit 5308c71cfd

View file

@ -219,6 +219,22 @@ static IDBProperties Test_DBProperties =
&Test_DBProperties_Vtbl
};
static void free_dbpropset(ULONG count, DBPROPSET *propset)
{
ULONG i;
for (i = 0; i < count; i++)
{
ULONG p;
for (p = 0; p < propset[i].cProperties; p++)
VariantClear(&propset[i].rgProperties[p].vValue);
CoTaskMemFree(propset[i].rgProperties);
}
CoTaskMemFree(propset);
}
static void test_IDBProperties(void)
{
HRESULT hr;
@ -257,6 +273,8 @@ static void test_IDBProperties(void)
ok(propsets->cProperties == 1, "Expected property count of 1 but got %ld\n", propsets->cProperties);
ok(IsEqualGUID(&propsets->guidPropertySet, &IID_IDBProperties), "Unexpected guid for property set\n");
free_dbpropset(propset_count, propsets);
IDBProperties_Release(pProxy);
end_host_object(tid, thread);