Commit 88472df4 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32/tests: Fix some leaks in safearray tests.

parent b116175d
...@@ -1321,6 +1321,7 @@ static void test_SafeArrayCopyData(void) ...@@ -1321,6 +1321,7 @@ static void test_SafeArrayCopyData(void)
ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n"); ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n");
ok(SafeArrayGetDim(sa) == SafeArrayGetDim(sacopy),"dimensions wrong\n"); ok(SafeArrayGetDim(sa) == SafeArrayGetDim(sacopy),"dimensions wrong\n");
ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n");
SafeArrayDestroy(sacopy);
} }
SafeArrayDestroy(sa); SafeArrayDestroy(sa);
...@@ -1548,6 +1549,7 @@ static void test_SafeArrayCopy(void) ...@@ -1548,6 +1549,7 @@ static void test_SafeArrayCopy(void)
hres = SafeArrayCopy(sa, &sa2); hres = SafeArrayCopy(sa, &sa2);
ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres);
SafeArrayDestroy(sa2);
SafeArrayDestroy(sa); SafeArrayDestroy(sa);
} }
...@@ -1652,6 +1654,7 @@ static void test_SafeArrayChangeTypeEx(void) ...@@ -1652,6 +1654,7 @@ static void test_SafeArrayChangeTypeEx(void)
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_UI1); hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_UI1);
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %x\n", hres); ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %x\n", hres);
SafeArrayDestroy(sa); SafeArrayDestroy(sa);
VariantClear(&v2);
} }
/* NULL/EMPTY */ /* NULL/EMPTY */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment