mirror of
https://github.com/reactos/reactos.git
synced 2024-10-18 15:07:43 +00:00
don't leak a bitmap object if we fail to allocate memory
svn path=/trunk/; revision=25478
This commit is contained in:
parent
138ba142b5
commit
5b7abf2e8a
|
@ -1516,8 +1516,8 @@ UserDrawIconEx(
|
|||
{
|
||||
BITMAPINFO bi;
|
||||
BITMAP bm;
|
||||
BITMAPOBJ *Bitmap;
|
||||
PBYTE pBits;
|
||||
BITMAPOBJ *Bitmap = NULL;
|
||||
PBYTE pBits = NULL;
|
||||
BLENDFUNCTION BlendFunc;
|
||||
BYTE Red, Green, Blue, Alpha;
|
||||
DWORD Count = 0;
|
||||
|
@ -1547,6 +1547,7 @@ UserDrawIconEx(
|
|||
if (pBits == NULL)
|
||||
{
|
||||
DPRINT1("ExAllocatePoolWithTag() failed!\n");
|
||||
GDIOBJ_UnlockObjByPtr(GdiHandleTable, Bitmap);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -1609,7 +1610,6 @@ UserDrawIconEx(
|
|||
cleanup:
|
||||
if(DoFlickerFree)
|
||||
{
|
||||
|
||||
if(hOldOffBmp) NtGdiSelectObject(hdcOff, hOldOffBmp);
|
||||
if(hOldOffBrush) NtGdiSelectObject(hdcOff, hOldOffBrush);
|
||||
if(hbmOff) NtGdiDeleteObject(hbmOff);
|
||||
|
|
Loading…
Reference in a new issue