diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dc18b22f508..74645b46379 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1566,6 +1566,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice* iface, break; case SURFACE_UNKNOWN: FIXME("Caller tried to create a SURFACE_UNKNOWN swapchain\n"); + HeapFree(GetProcessHeap(), 0, object); return WINED3DERR_INVALIDCALL; } object->wineD3DDevice = This;