Dereference the object if the type doesn't match in ObmReferenceObjectByHandle.

svn path=/trunk/; revision=14447
This commit is contained in:
Hartmut Birr 2005-04-02 16:17:08 +00:00
parent 7e355fdee2
commit fccdd32ffd

View file

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