mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +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:
parent
595488f92e
commit
6a814d763b
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue