d3d9: Fix memory leak in device_init() (Coverity).

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-04-15 14:37:44 +02:00 committed by Alexandre Julliard
parent 571ffaf380
commit a4f547a6a9
1 changed files with 1 additions and 0 deletions

View File

@ -4547,6 +4547,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
wined3d_swapchain_decref(d3d_swapchain->wined3d_swapchain);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
heap_free(swapchain_desc);
wined3d_mutex_unlock();
return E_OUTOFMEMORY;
}