mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
[NTOS:FSRTL]
- Use the correct parent node when replacing an identical cache entry in FsRtlAddToTunnelCache CORE-11819 svn path=/trunk/; revision=72193
This commit is contained in:
parent
72eefb7a68
commit
aed9207c96
1 changed files with 5 additions and 5 deletions
|
@ -467,21 +467,21 @@ FsRtlAddToTunnelCache(IN PTUNNEL Cache,
|
|||
else
|
||||
{
|
||||
/* update parent node */
|
||||
if (LastEntry->LeftChild == CurEntry)
|
||||
if (RtlIsLeftChild(CurEntry))
|
||||
{
|
||||
RtlInsertAsLeftChild(LastEntry, NodeEntry);
|
||||
RtlInsertAsLeftChild(RtlParent(CurEntry), NodeEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlInsertAsRightChild(LastEntry, NodeEntry);
|
||||
RtlInsertAsRightChild(RtlParent(CurEntry), NodeEntry);
|
||||
}
|
||||
}
|
||||
|
||||
/* remove entry */
|
||||
RemoveEntryList(&((PTUNNEL_NODE_ENTRY)LastEntry)->TimerQueueEntry);
|
||||
RemoveEntryList(&((PTUNNEL_NODE_ENTRY)CurEntry)->TimerQueueEntry);
|
||||
|
||||
/* free node entry */
|
||||
FsRtlFreeTunnelNode((PTUNNEL_NODE_ENTRY)LastEntry, &PoolList);
|
||||
FsRtlFreeTunnelNode((PTUNNEL_NODE_ENTRY)CurEntry, &PoolList);
|
||||
|
||||
/* decrement node count */
|
||||
Cache->NumEntries--;
|
||||
|
|
Loading…
Reference in a new issue