mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ole32/pointermoniker: Use CRT allocation functions.
This commit is contained in:
parent
a9d3d435bc
commit
894f1cde4a
1 changed files with 4 additions and 7 deletions
|
@ -32,7 +32,6 @@
|
|||
#include "objbase.h"
|
||||
#include "oleidl.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "moniker.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
@ -110,7 +109,7 @@ static ULONG WINAPI PointerMonikerImpl_Release(IMoniker *iface)
|
|||
if (!refcount)
|
||||
{
|
||||
if (moniker->pObject) IUnknown_Release(moniker->pObject);
|
||||
heap_free(moniker);
|
||||
free(moniker);
|
||||
}
|
||||
|
||||
return refcount;
|
||||
|
@ -600,8 +599,7 @@ HRESULT WINAPI CreatePointerMoniker(IUnknown *object, IMoniker **ret)
|
|||
if (!ret)
|
||||
return E_INVALIDARG;
|
||||
|
||||
moniker = heap_alloc(sizeof(*moniker));
|
||||
if (!moniker)
|
||||
if (!(moniker = calloc(1, sizeof(*moniker))))
|
||||
{
|
||||
*ret = NULL;
|
||||
return E_OUTOFMEMORY;
|
||||
|
@ -714,7 +712,7 @@ static ULONG WINAPI ObjrefMonikerImpl_Release(IMoniker *iface)
|
|||
if (!refcount)
|
||||
{
|
||||
if (moniker->pObject) IUnknown_Release(moniker->pObject);
|
||||
heap_free(moniker);
|
||||
free(moniker);
|
||||
}
|
||||
|
||||
return refcount;
|
||||
|
@ -1017,8 +1015,7 @@ HRESULT WINAPI CreateObjrefMoniker(IUnknown *obj, IMoniker **ret)
|
|||
if (!ret)
|
||||
return E_INVALIDARG;
|
||||
|
||||
moniker = heap_alloc(sizeof(*moniker));
|
||||
if (!moniker)
|
||||
if (!(moniker = calloc(1, sizeof(*moniker))))
|
||||
{
|
||||
*ret = NULL;
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
Loading…
Reference in a new issue