Author: fireball
Date: Wed Jul 29 17:29:50 2009
New Revision: 42288
URL:
http://svn.reactos.org/svn/reactos?rev=42288&view=rev
Log:
- GDIO_GetObjPtr: Don't go through handles array without obtaining a lock.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] Wed Jul 29
17:29:50 2009
@@ -167,8 +167,8 @@
GDIOBJHDR *ptr = NULL;
int i;
- //KeEnterCriticalRegion();
- //ExAcquireResourceExclusiveLite(GDI_resource, TRUE);
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite(GDI_resource, TRUE);
i = ((UINT_PTR)handle >> 2) - FIRST_LARGE_HANDLE;
if (i >= 0 && i < MAX_LARGE_HANDLES)
@@ -179,11 +179,12 @@
if (!ptr)
{
- //ExReleaseResourceLite(GDI_resource);
- //KeLeaveCriticalRegion();
DPRINT1( "Invalid handle %p\n", handle );
}
//else TRACE("(%p): enter %d\n", handle, GDI_level.crst.RecursionCount);
+
+ ExReleaseResourceLite(GDI_resource);
+ KeLeaveCriticalRegion();
return ptr;
}