mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 19:26:42 +00:00
[MSPAINT]
* Plug a handle leak. Fixed by Andre Guibert de Bruet. CORE-7190 #resolve #comment Committed in r59036. Thanks ! svn path=/trunk/; revision=59036
This commit is contained in:
@@ -131,7 +131,10 @@ LoadDIBFromFile(HBITMAP * hBitmap, LPTSTR name, LPSYSTEMTIME time, int *size, in
|
||||
|
||||
bi = HeapAlloc(GetProcessHeap(), 0, bfh.bfOffBits - sizeof(BITMAPFILEHEADER));
|
||||
if (!bi)
|
||||
{
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
ReadFile(hFile, bi, bfh.bfOffBits - sizeof(BITMAPFILEHEADER), &dwBytesRead, NULL);
|
||||
*hBitmap = CreateDIBSection(NULL, bi, DIB_RGB_COLORS, &pvBits, NULL, 0);
|
||||
|
||||
Reference in New Issue
Block a user