mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 20:23:59 +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));
|
bi = HeapAlloc(GetProcessHeap(), 0, bfh.bfOffBits - sizeof(BITMAPFILEHEADER));
|
||||||
if (!bi)
|
if (!bi)
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ReadFile(hFile, bi, bfh.bfOffBits - sizeof(BITMAPFILEHEADER), &dwBytesRead, NULL);
|
ReadFile(hFile, bi, bfh.bfOffBits - sizeof(BITMAPFILEHEADER), &dwBytesRead, NULL);
|
||||||
*hBitmap = CreateDIBSection(NULL, bi, DIB_RGB_COLORS, &pvBits, NULL, 0);
|
*hBitmap = CreateDIBSection(NULL, bi, DIB_RGB_COLORS, &pvBits, NULL, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue