oledb32: Avoid leak in error path on safearray conversion (Coverity).

This commit is contained in:
Marcus Meissner 2013-05-25 09:25:19 +02:00 committed by Alexandre Julliard
parent 64fb92ab38
commit 36fee7c2e5

View File

@ -957,9 +957,11 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
for(i =0; i < size; i++,p++)
{
hr = SafeArrayPutElement(psa, &i, &p);
if(FAILED(hr))
if(FAILED(hr)) {
SafeArrayDestroy (psa);
return hr;
}
}
V_VT(v) = VT_ARRAY|VT_UI1;
V_ARRAY(v) = psa;