Commit ee1f2c46 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't leak the context array in the swapchain_init() error path.

parent b4448d9b
......@@ -913,10 +913,15 @@ err:
HeapFree(GetProcessHeap(), 0, swapchain->backBuffer);
}
if (swapchain->context && swapchain->context[0])
if (swapchain->context)
{
context_release(swapchain->context[0]);
context_destroy(device, swapchain->context[0]);
if (swapchain->context[0])
{
context_release(swapchain->context[0]);
context_destroy(device, swapchain->context[0]);
swapchain->num_contexts = 0;
}
HeapFree(GetProcessHeap(), 0, swapchain->context);
}
if (swapchain->frontBuffer) IWineD3DSurface_Release(swapchain->frontBuffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment