dswave: Finish the cleanup of create_dswave().
This commit is contained in:
parent
7370bed714
commit
e444c31f9e
|
@ -425,14 +425,14 @@ static const IPersistStreamVtbl persiststream_vtbl = {
|
||||||
/* for ClassFactory */
|
/* for ClassFactory */
|
||||||
HRESULT WINAPI create_dswave(REFIID lpcGUID, void **ppobj)
|
HRESULT WINAPI create_dswave(REFIID lpcGUID, void **ppobj)
|
||||||
{
|
{
|
||||||
IDirectMusicWaveImpl* obj;
|
IDirectMusicWaveImpl *obj;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveImpl));
|
obj = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicWaveImpl));
|
||||||
if (NULL == obj) {
|
if (!obj) {
|
||||||
*ppobj = NULL;
|
*ppobj = NULL;
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
obj->IUnknown_iface.lpVtbl = &unknown_vtbl;
|
obj->IUnknown_iface.lpVtbl = &unknown_vtbl;
|
||||||
obj->ref = 1;
|
obj->ref = 1;
|
||||||
dmobject_init(&obj->dmobj, &CLSID_DirectSoundWave, &obj->IUnknown_iface);
|
dmobject_init(&obj->dmobj, &CLSID_DirectSoundWave, &obj->IUnknown_iface);
|
||||||
|
|
Loading…
Reference in New Issue