Commit dcc049ad authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

oledb32: Use CRT allocation functions.

parent aa8e2a16
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "oledb_private.h" #include "oledb_private.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(oledb); WINE_DEFAULT_DEBUG_CHANNEL(oledb);
...@@ -102,7 +101,7 @@ static ULONG WINAPI convert_Release(IDataConvert* iface) ...@@ -102,7 +101,7 @@ static ULONG WINAPI convert_Release(IDataConvert* iface)
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if(ref == 0) if(ref == 0)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -1705,7 +1704,7 @@ HRESULT create_oledb_convert(IUnknown *outer, void **obj) ...@@ -1705,7 +1704,7 @@ HRESULT create_oledb_convert(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION; if(outer) return CLASS_E_NOAGGREGATION;
This = heap_alloc(sizeof(*This)); This = malloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY; if(!This) return E_OUTOFMEMORY;
This->IDataConvert_iface.lpVtbl = &convert_vtbl; This->IDataConvert_iface.lpVtbl = &convert_vtbl;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "resource.h" #include "resource.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(oledb); WINE_DEFAULT_DEBUG_CHANNEL(oledb);
...@@ -49,7 +48,7 @@ struct datasource ...@@ -49,7 +48,7 @@ struct datasource
static struct datasource *create_datasource(WCHAR *guid) static struct datasource *create_datasource(WCHAR *guid)
{ {
struct datasource *data = heap_alloc_zero(sizeof(struct datasource)); struct datasource *data = calloc(1, sizeof(struct datasource));
if (data) if (data)
{ {
CLSIDFromString(guid, &data->clsid); CLSIDFromString(guid, &data->clsid);
...@@ -75,7 +74,7 @@ static void destroy_datasource(struct datasource *data) ...@@ -75,7 +74,7 @@ static void destroy_datasource(struct datasource *data)
if (data->provider) if (data->provider)
IDBProperties_Release(data->provider); IDBProperties_Release(data->provider);
heap_free(data); free(data);
} }
static BOOL initialize_datasource(struct datasource *data) static BOOL initialize_datasource(struct datasource *data)
...@@ -191,7 +190,7 @@ static ULONG WINAPI dslocator_Release(IDataSourceLocator *iface) ...@@ -191,7 +190,7 @@ static ULONG WINAPI dslocator_Release(IDataSourceLocator *iface)
if (!ref) if (!ref)
{ {
heap_free(This); free(This);
} }
return ref; return ref;
...@@ -775,7 +774,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj) ...@@ -775,7 +774,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION; if(outer) return CLASS_E_NOAGGREGATION;
This = heap_alloc(sizeof(*This)); This = malloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY; if(!This) return E_OUTOFMEMORY;
This->IDataSourceLocator_iface.lpVtbl = &DSLocatorVtbl; This->IDataSourceLocator_iface.lpVtbl = &DSLocatorVtbl;
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "oledb_private.h" #include "oledb_private.h"
#include "wine/heap.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -124,8 +123,8 @@ static ULONG WINAPI errorrecords_Release(IErrorInfo* iface) ...@@ -124,8 +123,8 @@ static ULONG WINAPI errorrecords_Release(IErrorInfo* iface)
CoTaskMemFree(dispparams->rgvarg); CoTaskMemFree(dispparams->rgvarg);
CoTaskMemFree(dispparams->rgdispidNamedArgs); CoTaskMemFree(dispparams->rgdispidNamedArgs);
} }
heap_free(This->records); free(This->records);
heap_free(This); free(This);
} }
return ref; return ref;
} }
...@@ -276,7 +275,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p ...@@ -276,7 +275,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
if (!This->records) if (!This->records)
{ {
const unsigned int initial_size = 16; const unsigned int initial_size = 16;
if (!(This->records = heap_alloc(initial_size * sizeof(*This->records)))) if (!(This->records = malloc(initial_size * sizeof(*This->records))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->allocated = initial_size; This->allocated = initial_size;
...@@ -285,7 +284,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p ...@@ -285,7 +284,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
{ {
struct ErrorEntry *new_ptr; struct ErrorEntry *new_ptr;
new_ptr = heap_realloc(This->records, 2 * This->allocated * sizeof(*This->records)); new_ptr = realloc(This->records, 2 * This->allocated * sizeof(*This->records));
if (!new_ptr) if (!new_ptr)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
...@@ -419,7 +418,7 @@ HRESULT create_error_info(IUnknown *outer, void **obj) ...@@ -419,7 +418,7 @@ HRESULT create_error_info(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION; if(outer) return CLASS_E_NOAGGREGATION;
This = heap_alloc(sizeof(*This)); This = malloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY; if(!This) return E_OUTOFMEMORY;
This->IErrorInfo_iface.lpVtbl = &ErrorInfoVtbl; This->IErrorInfo_iface.lpVtbl = &ErrorInfoVtbl;
......
...@@ -81,7 +81,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p) ...@@ -81,7 +81,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
DispatchMessageW(&msg); DispatchMessageW(&msg);
} }
HeapFree(GetProcessHeap(), 0, data); free(data);
CoUninitialize(); CoUninitialize();
...@@ -92,7 +92,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, ...@@ -92,7 +92,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object,
{ {
DWORD tid = 0; DWORD tid = 0;
HANDLE marshal_event = CreateEventW(NULL, FALSE, FALSE, NULL); HANDLE marshal_event = CreateEventW(NULL, FALSE, FALSE, NULL);
struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); struct host_object_data *data = malloc(sizeof(*data));
data->stream = stream; data->stream = stream;
data->iid = *riid; data->iid = *riid;
......
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