From 36fee7c2e5e9339256d5b1e7cad632af4863690c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 25 May 2013 09:25:19 +0200 Subject: [PATCH] oledb32: Avoid leak in error path on safearray conversion (Coverity). --- dlls/oledb32/convert.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 0961464415..a2fd0cbac2 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -957,8 +957,10 @@ 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;