mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:52:57 +00:00
[NTOS:OB] Fix incorrect variable name in ObfDereferenceObject.
This commit is contained in:
parent
60346a5732
commit
8c8c03e9a8
1 changed files with 9 additions and 9 deletions
|
@ -111,7 +111,7 @@ ObInitializeFastReference(IN PEX_FAST_REF FastRef,
|
||||||
{
|
{
|
||||||
/* Check if we were given an object and reference it 7 times */
|
/* Check if we were given an object and reference it 7 times */
|
||||||
if (Object) ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
if (Object) ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
||||||
|
|
||||||
/* Setup the fast reference */
|
/* Setup the fast reference */
|
||||||
ExInitializeFastReference(FastRef, Object);
|
ExInitializeFastReference(FastRef, Object);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ ObFastReferenceObject(IN PEX_FAST_REF FastRef)
|
||||||
|
|
||||||
/* Otherwise, reference the object 7 times */
|
/* Otherwise, reference the object 7 times */
|
||||||
ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
||||||
|
|
||||||
/* Now update the reference count */
|
/* Now update the reference count */
|
||||||
if (!ExInsertFastReference(FastRef, Object))
|
if (!ExInsertFastReference(FastRef, Object))
|
||||||
{
|
{
|
||||||
|
@ -184,11 +184,11 @@ ObFastReplaceObject(IN PEX_FAST_REF FastRef,
|
||||||
|
|
||||||
/* Check if we were given an object and reference it 7 times */
|
/* Check if we were given an object and reference it 7 times */
|
||||||
if (Object) ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
if (Object) ObReferenceObjectEx(Object, MAX_FAST_REFS);
|
||||||
|
|
||||||
/* Do the swap */
|
/* Do the swap */
|
||||||
OldValue = ExSwapFastReference(FastRef, Object);
|
OldValue = ExSwapFastReference(FastRef, Object);
|
||||||
OldObject = ExGetObjectFastReference(OldValue);
|
OldObject = ExGetObjectFastReference(OldValue);
|
||||||
|
|
||||||
/* Check if we had an active object and dereference it */
|
/* Check if we had an active object and dereference it */
|
||||||
Count = ExGetCountFastReference(OldValue);
|
Count = ExGetCountFastReference(OldValue);
|
||||||
if ((OldObject) && (Count)) ObDereferenceObjectEx(OldObject, Count);
|
if ((OldObject) && (Count)) ObDereferenceObjectEx(OldObject, Count);
|
||||||
|
@ -320,7 +320,7 @@ FASTCALL
|
||||||
ObfDereferenceObject(IN PVOID Object)
|
ObfDereferenceObject(IN PVOID Object)
|
||||||
{
|
{
|
||||||
POBJECT_HEADER Header;
|
POBJECT_HEADER Header;
|
||||||
LONG_PTR OldCount;
|
LONG_PTR NewCount;
|
||||||
|
|
||||||
/* Extract the object header */
|
/* Extract the object header */
|
||||||
Header = OBJECT_TO_OBJECT_HEADER(Object);
|
Header = OBJECT_TO_OBJECT_HEADER(Object);
|
||||||
|
@ -332,8 +332,8 @@ ObfDereferenceObject(IN PVOID Object)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check whether the object can now be deleted. */
|
/* Check whether the object can now be deleted. */
|
||||||
OldCount = InterlockedDecrementSizeT(&Header->PointerCount);
|
NewCount = InterlockedDecrementSizeT(&Header->PointerCount);
|
||||||
if (!OldCount)
|
if (!NewCount)
|
||||||
{
|
{
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
ASSERT(Header->HandleCount == 0);
|
ASSERT(Header->HandleCount == 0);
|
||||||
|
@ -351,8 +351,8 @@ ObfDereferenceObject(IN PVOID Object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the old count */
|
/* Return the new count */
|
||||||
return OldCount;
|
return NewCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue