Nikolay Sivov : oledb32: Use heap helpers for allocation.
Module: wine Branch: master Commit: 75bde26bea637f5bb08a7447dbcf360b4b808c37 URL: http://source.winehq.org/git/wine.git/?a=commit;h=75bde26bea637f5bb08a7447db... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 2 09:53:58 2013 +0400 oledb32: Use heap helpers for allocation. --- dlls/oledb32/convert.c | 6 ++---- dlls/oledb32/datainit.c | 12 ++++-------- dlls/oledb32/errorinfo.c | 4 ++-- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 8875057..fba9025 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -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; diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c index 58bd812..9fe3c4f 100644 --- a/dlls/oledb32/datainit.c +++ b/dlls/oledb32/datainit.c @@ -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; diff --git a/dlls/oledb32/errorinfo.c b/dlls/oledb32/errorinfo.c index 4e65ce5..eef2b37 100644 --- a/dlls/oledb32/errorinfo.c +++ b/dlls/oledb32/errorinfo.c @@ -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;
participants (1)
-
Alexandre Julliard