oleaut32/tests: Avoid a memory leak; spotted by Valgrind.
This commit is contained in:
parent
026576995e
commit
6401720daf
|
@ -396,7 +396,10 @@ static void test_marshal_LPSAFEARRAY(void)
|
||||||
hr = SafeArrayGetElement(lpsa2, indices, &gotvalue);
|
hr = SafeArrayGetElement(lpsa2, indices, &gotvalue);
|
||||||
ok(hr == S_OK, "Failed to get bstr element at hres 0x%x\n", hr);
|
ok(hr == S_OK, "Failed to get bstr element at hres 0x%x\n", hr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK)
|
||||||
|
{
|
||||||
ok(VarBstrCmp(values[i], gotvalue, 0, 0) == VARCMP_EQ, "String %d does not match\n", i);
|
ok(VarBstrCmp(values[i], gotvalue, 0, 0) == VARCMP_EQ, "String %d does not match\n", i);
|
||||||
|
SysFreeString(gotvalue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SysFreeString(values[i]);
|
SysFreeString(values[i]);
|
||||||
|
|
Loading…
Reference in New Issue