don't leak a bitmap object if we fail to allocate memory

svn path=/trunk/; revision=25478
This commit is contained in:
Ged Murphy 2007-01-16 00:08:41 +00:00
parent 138ba142b5
commit 5b7abf2e8a

View file

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