wined3d: Don't leak the swapchain in IWineD3DDeviceImpl_Reset() if the display mode is unsupported.

Henri Verbeet hverbeet at codeweavers.com
Tue Mar 31 02:38:14 CDT 2009


There is a similar leak a couple of lines down, but that one should be fixed
by David's patch.
---
 dlls/wined3d/device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e47fc02..2bf8d48 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -7593,6 +7593,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
         WARN("Rejecting Reset() call because the requested display mode is not supported\n");
         WARN("Requested mode: %d, %d\n", pPresentationParameters->BackBufferWidth,
              pPresentationParameters->BackBufferHeight);
+        IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain);
         return WINED3DERR_INVALIDCALL;
     }
 
-- 
1.6.0.6



--------------000801030100020508000205--



More information about the wine-patches mailing list