Nikolay Sivov : xolehlp: Use CRT allocation functions.
Alexandre Julliard
julliard at winehq.org
Wed Jul 13 16:53:52 CDT 2022
Module: wine
Branch: master
Commit: 53d28704acf4588ea875c2ab9530eb12147b87f8
URL: https://gitlab.winehq.org/wine/wine/-/commit/53d28704acf4588ea875c2ab9530eb12147b87f8
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Jul 13 11:40:07 2022 +0300
xolehlp: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/xolehlp/xolehlp.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/xolehlp/xolehlp.c b/dlls/xolehlp/xolehlp.c
index e61f4b35fc8..126425c784d 100644
--- a/dlls/xolehlp/xolehlp.c
+++ b/dlls/xolehlp/xolehlp.c
@@ -82,7 +82,7 @@ static ULONG WINAPI ResourceManager_Release(IResourceManager *iface)
if (ref == 0)
{
- HeapFree(GetProcessHeap(), 0, This);
+ free(This);
}
return ref;
@@ -130,7 +130,7 @@ static HRESULT ResourceManager_Create(REFIID riid, void **ppv)
if (!ppv) return E_INVALIDARG;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(ResourceManager));
+ This = malloc(sizeof(*This));
if (!This) return E_OUTOFMEMORY;
This->IResourceManager_iface.lpVtbl = &ResourceManager_Vtbl;
@@ -200,7 +200,7 @@ static ULONG WINAPI TransactionOptions_Release(ITransactionOptions *iface)
if (ref == 0)
{
- HeapFree(GetProcessHeap(), 0, This);
+ free(This);
}
return ref;
@@ -240,7 +240,7 @@ static HRESULT TransactionOptions_Create(ITransactionOptions **ppv)
if (!ppv) return E_INVALIDARG;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(TransactionOptions));
+ This = malloc(sizeof(*This));
if (!This) return E_OUTOFMEMORY;
This->ITransactionOptions_iface.lpVtbl = &TransactionOptions_Vtbl;
@@ -309,7 +309,7 @@ static ULONG WINAPI Transaction_Release(ITransaction *iface)
if (ref == 0)
{
- HeapFree(GetProcessHeap(), 0, This);
+ free(This);
}
return ref;
@@ -352,9 +352,8 @@ static HRESULT Transaction_Create(ISOLEVEL isoLevel, ULONG isoFlags,
if (!ppv) return E_INVALIDARG;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(Transaction));
+ This = calloc(1, sizeof(*This));
if (!This) return E_OUTOFMEMORY;
- ZeroMemory(&This->info, sizeof(This->info));
This->ITransaction_iface.lpVtbl = &Transaction_Vtbl;
This->ref = 1;
@@ -439,7 +438,7 @@ static ULONG WINAPI TransactionDispenser_Release(ITransactionDispenser *iface)
if (ref == 0)
{
- HeapFree(GetProcessHeap(), 0, This);
+ free(This);
}
return ref;
@@ -614,7 +613,7 @@ static HRESULT TransactionManager_Create(REFIID riid, void **ppv)
TransactionManager *This;
HRESULT ret;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(TransactionManager));
+ This = malloc(sizeof(*This));
if (!This) return E_OUTOFMEMORY;
This->ITransactionDispenser_iface.lpVtbl = &TransactionDispenser_Vtbl;
More information about the wine-cvs
mailing list