Commit 8bcaec25 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dswave: Use CRT allocation functions.

parent 65f25a15
......@@ -84,9 +84,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
TRACE("(%p) ref=%ld\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
}
if (!ref) free(This);
return ref;
}
......@@ -179,11 +177,8 @@ HRESULT create_dswave(REFIID lpcGUID, void **ppobj)
IDirectMusicWaveImpl *obj;
HRESULT hr;
obj = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicWaveImpl));
if (!obj) {
*ppobj = NULL;
return E_OUTOFMEMORY;
}
*ppobj = NULL;
if (!(obj = calloc(1, sizeof(*obj)))) return E_OUTOFMEMORY;
obj->IUnknown_iface.lpVtbl = &unknown_vtbl;
obj->ref = 1;
dmobject_init(&obj->dmobj, &CLSID_DirectSoundWave, &obj->IUnknown_iface);
......
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