Commit 7ab7e299 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/git: Use CRT allocation functions.

parent 0f72487b
...@@ -182,7 +182,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal( ...@@ -182,7 +182,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal(
zero.QuadPart = 0; zero.QuadPart = 0;
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
entry = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGITEntry)); entry = malloc(sizeof(*entry));
if (!entry) if (!entry)
{ {
CoReleaseMarshalData(stream); CoReleaseMarshalData(stream);
...@@ -240,8 +240,8 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal( ...@@ -240,8 +240,8 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
return hr; return hr;
} }
IStream_Release(entry->stream); IStream_Release(entry->stream);
HeapFree(GetProcessHeap(), 0, entry); free(entry);
return S_OK; return S_OK;
} }
...@@ -306,7 +306,7 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow ...@@ -306,7 +306,7 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow
if (!std_git) if (!std_git)
{ {
git = heap_alloc(sizeof(*git)); git = malloc(sizeof(*git));
if (!git) return E_OUTOFMEMORY; if (!git) return E_OUTOFMEMORY;
git->IGlobalInterfaceTable_iface.lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl; git->IGlobalInterfaceTable_iface.lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl;
...@@ -315,7 +315,7 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow ...@@ -315,7 +315,7 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow
if (InterlockedCompareExchangePointer((void **)&std_git, &git->IGlobalInterfaceTable_iface, NULL)) if (InterlockedCompareExchangePointer((void **)&std_git, &git->IGlobalInterfaceTable_iface, NULL))
{ {
heap_free(git); free(git);
} }
else else
TRACE("Created the GIT %p\n", git); TRACE("Created the GIT %p\n", git);
...@@ -326,20 +326,20 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow ...@@ -326,20 +326,20 @@ HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknow
void release_std_git(void) void release_std_git(void)
{ {
StdGlobalInterfaceTableImpl *git; StdGlobalInterfaceTableImpl *git;
StdGITEntry *entry, *entry2; StdGITEntry *entry, *entry2;
if (!std_git) return; if (!std_git) return;
git = impl_from_IGlobalInterfaceTable(std_git); git = impl_from_IGlobalInterfaceTable(std_git);
LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &git->list, StdGITEntry, entry) LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &git->list, StdGITEntry, entry)
{ {
list_remove(&entry->entry); list_remove(&entry->entry);
CoReleaseMarshalData(entry->stream); CoReleaseMarshalData(entry->stream);
IStream_Release(entry->stream); IStream_Release(entry->stream);
HeapFree(GetProcessHeap(), 0, entry); free(entry);
} }
HeapFree(GetProcessHeap(), 0, git); free(git);
} }
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