From fccdd32ffd406771f0f222637aa3842eba072c06 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 2 Apr 2005 16:17:08 +0000 Subject: [PATCH] Dereference the object if the type doesn't match in ObmReferenceObjectByHandle. svn path=/trunk/; revision=14447 --- reactos/subsys/win32k/misc/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/subsys/win32k/misc/object.c b/reactos/subsys/win32k/misc/object.c index 28b04eb9936..d93175d4b51 100644 --- a/reactos/subsys/win32k/misc/object.c +++ b/reactos/subsys/win32k/misc/object.c @@ -461,6 +461,7 @@ ObmReferenceObjectByHandle(PUSER_HANDLE_TABLE HandleTable, if ((ObjectType != otUnknown) && (ObjectHeader->Type != ObjectType)) { DPRINT1("Object type mismatch 0x%x 0x%x\n", ObjectType, ObjectHeader->Type); + ObmDereferenceObject(ObjectBody); return STATUS_UNSUCCESSFUL; }