Commit 75bde26b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oledb32: Use heap helpers for allocation.

parent b4bab767
......@@ -103,9 +103,7 @@ static ULONG WINAPI convert_Release(IDataConvert* iface)
ref = InterlockedDecrement(&This->ref);
if(ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
heap_free(This);
return ref;
}
......@@ -1548,7 +1546,7 @@ HRESULT create_oledb_convert(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
This = heap_alloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY;
This->IDataConvert_iface.lpVtbl = &convert_vtbl;
......
......@@ -173,9 +173,7 @@ static ULONG WINAPI dbinit_Release(IDBInitialize *iface)
ref = InterlockedDecrement(&This->ref);
if(ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
heap_free(This);
return ref;
}
......@@ -215,7 +213,7 @@ static HRESULT create_db_init(void **obj)
*obj = NULL;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
This = heap_alloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY;
This->IDBInitialize_iface.lpVtbl = &dbinit_vtbl;
......@@ -266,9 +264,7 @@ static ULONG WINAPI datainit_Release(IDataInitialize *iface)
ref = InterlockedDecrement(&This->ref);
if(ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
heap_free(This);
return ref;
}
......@@ -818,7 +814,7 @@ HRESULT create_data_init(IUnknown *outer, void **obj)
*obj = NULL;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
This = heap_alloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY;
This->IDataInitialize_iface.lpVtbl = &datainit_vtbl;
......
......@@ -117,7 +117,7 @@ static ULONG WINAPI IErrorInfoImpl_Release(IErrorInfo* iface)
SysFreeString(This->source);
SysFreeString(This->description);
SysFreeString(This->help_file);
HeapFree(GetProcessHeap(), 0, This);
heap_free(This);
}
return ref;
}
......@@ -340,7 +340,7 @@ HRESULT create_error_info(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
This = heap_alloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY;
This->IErrorInfo_iface.lpVtbl = &ErrorInfoVtbl;
......
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