wined3d: Fix memory leak in wined3d_swapchain_state_create() (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-08-05 15:30:00 +02:00 committed by Alexandre Julliard
parent 21c1ab7a73
commit 14dee7bd0d
1 changed files with 3 additions and 0 deletions

View File

@ -1624,7 +1624,10 @@ HRESULT CDECL wined3d_swapchain_state_create(const struct wined3d_swapchain_desc
return E_OUTOFMEMORY;
if (FAILED(hr = wined3d_swapchain_state_init(s, desc, window, wined3d, adapter_idx)))
{
heap_free(s);
return hr;
}
*state = s;