This fixes a crash for me when reallocating "handles", triggered by the mfplat tests.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/mfplat/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index e4cd1c397ad..54bd70a2fff 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -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);