Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dispex/usrmarshal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dispex/usrmarshal.c b/dlls/dispex/usrmarshal.c index 4c837b53397..16e0b684028 100644 --- a/dlls/dispex/usrmarshal.c +++ b/dlls/dispex/usrmarshal.c @@ -134,7 +134,7 @@ HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID any on return. */ if(byref_args) { - vt_list = HeapAlloc(GetProcessHeap(), 0, pdp->cArgs * sizeof(vt_list[0])); + vt_list = malloc(pdp->cArgs * sizeof(vt_list[0])); if(!vt_list) return E_OUTOFMEMORY; for(arg = 0; arg < pdp->cArgs; arg++) vt_list[arg] = V_VT(pdp->rgvarg + arg); @@ -166,6 +166,6 @@ HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID for(arg = 0; arg < byref_args; arg++) VariantInit(pdp->rgvarg + ref_idx[arg]);
- HeapFree(GetProcessHeap(), 0, vt_list); + free(vt_list); return hr; }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dispex/tests/marshal.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/dispex/tests/marshal.c b/dlls/dispex/tests/marshal.c index 137d81b9d8d..4a5f33a3c9c 100644 --- a/dlls/dispex/tests/marshal.c +++ b/dlls/dispex/tests/marshal.c @@ -86,7 +86,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p) DispatchMessageA(&msg); }
- HeapFree(GetProcessHeap(), 0, data); + free(data);
CoUninitialize();
@@ -97,7 +97,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, { DWORD tid = 0, ret; HANDLE events[2]; - struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); + struct host_object_data *data = malloc(sizeof(*data));
data->stream = stream; data->iid = *riid; @@ -179,9 +179,8 @@ static ULONG WINAPI dispex_Release(IDispatchEx* iface) ULONG refs = InterlockedDecrement(&This->refs); trace("Release\n"); if(!refs) - { - HeapFree(GetProcessHeap(), 0, This); - } + free(This); + return refs; }
@@ -350,7 +349,7 @@ static IDispatchEx *dispex_create(void) { dispex *This;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if (!This) return NULL; This->IDispatchEx_iface.lpVtbl = &dispex_vtable; This->refs = 1;