From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/oledb32/tests/database.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c index 67b45737ba8..ebd3cb2fadf 100644 --- a/dlls/oledb32/tests/database.c +++ b/dlls/oledb32/tests/database.c @@ -47,6 +47,19 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ok_(__FILE__, line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
+static void free_dbpropinfoset(ULONG count, DBPROPINFOSET *propinfoset) +{ + ULONG i, j; + + for (i = 0; i < count; i++) + { + for (j = 0; j < propinfoset[i].cPropertyInfos; j++) + VariantClear(&propinfoset[i].rgPropertyInfos[j].vValues); + CoTaskMemFree(propinfoset[i].rgPropertyInfos); + } + CoTaskMemFree(propinfoset); +} + static void test_GetDataSource(const WCHAR *initstring) { IDataInitialize *datainit = NULL; @@ -90,7 +103,7 @@ static void test_GetDataSource(const WCHAR *initstring) pInfoset->rgPropertyInfos[i].vtType); }
- CoTaskMemFree(pInfoset); + free_dbpropinfoset(cnt, pInfoset); CoTaskMemFree(ary); }