[host] dxgi: fix memory leak if an error occurs

This commit is contained in:
Geoffrey McRae 2020-10-06 22:32:10 +11:00
parent 8692e9af80
commit 4f4d2dbf42

View File

@ -758,6 +758,8 @@ static CaptureResult dxgi_capture()
}
}
IDXGIResource_Release(res);
// if the pointer shape has changed
uint32_t bufferSize;
if (frameInfo.PointerShapeBufferSize > 0)
@ -854,8 +856,6 @@ static CaptureResult dxgi_capture()
}
}
IDXGIResource_Release(res);
if (frameInfo.LastMouseUpdateTime.QuadPart)
{
/* the pointer position is only valid if the pointer is visible */