Commit 18c51a9c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

oledb32: Avoid leaking propsets on error paths (Coverity).

parent 3a29e876
......@@ -293,11 +293,10 @@ static HRESULT set_dbpropset(BSTR name, BSTR value, DBPROPSET **propset)
{
static const WCHAR datasourceW[] = {'D','a','t','a',' ','S','o','u','r','c','e',0};
*propset = CoTaskMemAlloc(sizeof(DBPROPSET));
(*propset)->rgProperties = CoTaskMemAlloc(sizeof(DBPROP));
if (!strcmpW(datasourceW, name))
{
*propset = CoTaskMemAlloc(sizeof(DBPROPSET));
(*propset)->rgProperties = CoTaskMemAlloc(sizeof(DBPROP));
(*propset)->cProperties = 1;
(*propset)->guidPropertySet = DBPROPSET_DBINIT;
(*propset)->rgProperties[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
......@@ -310,6 +309,7 @@ static HRESULT set_dbpropset(BSTR name, BSTR value, DBPROPSET **propset)
}
else
{
*propset = NULL;
FIXME("unsupported property %s\n", debugstr_w(name));
return E_FAIL;
}
......
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