[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:
Amine Khaldi 2013-05-18 14:48:51 +00:00
parent 595488f92e
commit 6a814d763b

View file

@ -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);