mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 06:31:54 +00:00 
			
		
		
		
	[host] dxgi: fix memory leak if an error occurs
This commit is contained in:
		@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user