Commit 36fee7c2 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

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