Commit 894f1cde authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/pointermoniker: Use CRT allocation functions.

parent a9d3d435
......@@ -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;
......
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