mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
don't free pool when allocation failed
svn path=/trunk/; revision=30690
This commit is contained in:
@@ -662,6 +662,11 @@ BITMAPOBJ_CopyBitmap(HBITMAP hBitmap)
|
||||
if (resBitmap)
|
||||
{
|
||||
buf = ExAllocatePoolWithTag (PagedPool, bm.bmWidthBytes * abs(bm.bmHeight), TAG_BITMAP);
|
||||
if (buf == NULL)
|
||||
{
|
||||
GDIOBJ_UnlockObjByPtr(GdiHandleTable, resBitmap);
|
||||
return 0;
|
||||
}
|
||||
IntGetBitmapBits (Bitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
|
||||
IntSetBitmapBits (resBitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
|
||||
ExFreePool (buf);
|
||||
|
||||
Reference in New Issue
Block a user