From 14dee7bd0ddd9e7f6393d33ce26c09d9885c2b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 5 Aug 2019 15:30:00 +0200 Subject: [PATCH] wined3d: Fix memory leak in wined3d_swapchain_state_create() (Coverity). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/swapchain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 7d73dd1eee5..04ee0454b61 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -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;