[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 12 Jan 2011 01:01:30 +0000 (01:01 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 12 Jan 2011 01:01:30 +0000 (01:01 +0000)
Don't leak the memory for DIB sections. we set BMF_DONT_FREE in SURFACE_bSetBitmapBits, when the caller provides bits. This needs to be reconsidered.

svn path=/trunk/; revision=50363

reactos/subsystems/win32/win32k/objects/dibobj.c

index 7a38ba5..6ab2f6c 100644 (file)
@@ -1541,6 +1541,7 @@ DIB_CreateDIBSection(
     bmp->dwOffset = offset;
     bmp->flags = API_BITMAP;
     bmp->biClrImportant = bi->biClrImportant;
+    bmp->SurfObj.fjBitmap &= ~BMF_DONT_FREE;
 
        /* HACK */
        if(hpal != (HPALETTE)0xFFFFFFFF)