Commit 777383b8 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

oledb32: Use standard C functions for memory allocation in rowpos.c.

parent f41214ed
......@@ -27,8 +27,3 @@ HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPWSTR initstring, REFIID
IUnknown **datasource) DECLSPEC_HIDDEN;
extern HINSTANCE instance;
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t size)
{
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size);
}
......@@ -28,7 +28,6 @@
#include "oledb_private.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(oledb);
......@@ -152,7 +151,7 @@ static ULONG WINAPI rowpos_Release(IRowPosition* iface)
if (This->rowset) IRowset_Release(This->rowset);
if (This->chrst) IChapteredRowset_Release(This->chrst);
rowposchange_cp_destroy(&This->cp);
heap_free(This);
free(This);
}
return ref;
......@@ -405,16 +404,17 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
if (i == This->sinks_size)
{
new_sinks = heap_realloc_zero(This->sinks, 2 * This->sinks_size * sizeof(*This->sinks));
new_sinks = realloc(This->sinks, 2 * This->sinks_size * sizeof(*This->sinks));
if (!new_sinks)
return E_OUTOFMEMORY;
memset(new_sinks + This->sinks_size, 0, This->sinks_size * sizeof(*This->sinks));
This->sinks = new_sinks;
This->sinks_size *= 2;
}
}
else
{
This->sinks = heap_alloc_zero(10 * sizeof(*This->sinks));
This->sinks = calloc(10, sizeof(*This->sinks));
if (!This->sinks)
return E_OUTOFMEMORY;
This->sinks_size = 10;
......@@ -477,7 +477,7 @@ void rowposchange_cp_destroy(rowpos_cp *cp)
if (cp->sinks[i])
IRowPositionChange_Release(cp->sinks[i]);
}
heap_free(cp->sinks);
free(cp->sinks);
}
HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
......@@ -490,7 +490,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
if(outer) return CLASS_E_NOAGGREGATION;
This = heap_alloc(sizeof(*This));
This = malloc(sizeof(*This));
if(!This) return E_OUTOFMEMORY;
This->IRowPosition_iface.lpVtbl = &rowpos_vtbl;
......
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