mfplat: Zero-initialize the device manager object.
This fixes a crash for me when reallocating "handles", triggered by the mfplat tests. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
636d398c7d
commit
1452e47f0a
|
@ -8911,14 +8911,12 @@ HRESULT WINAPI MFCreateDXGIDeviceManager(UINT *token, IMFDXGIDeviceManager **man
|
|||
if (!token || !manager)
|
||||
return E_POINTER;
|
||||
|
||||
object = heap_alloc(sizeof(*object));
|
||||
if (!object)
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IMFDXGIDeviceManager_iface.lpVtbl = &dxgi_device_manager_vtbl;
|
||||
object->refcount = 1;
|
||||
object->token = GetTickCount();
|
||||
object->device = NULL;
|
||||
InitializeCriticalSection(&object->cs);
|
||||
InitializeConditionVariable(&object->lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue