mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
[RTL]
- Use the correct busy node pointer in RtlpPageHeapDestroy CORE-9735 #resolve svn path=/trunk/; revision=68866
This commit is contained in:
parent
af3114c491
commit
285991f04c
1 changed files with 6 additions and 4 deletions
|
@ -1266,7 +1266,7 @@ RtlpDphFreeDelayedBlocksFromHeap(PDPH_HEAP_ROOT DphRoot,
|
||||||
RtlpDphNumberOfDelayedFreeBlocks--;
|
RtlpDphNumberOfDelayedFreeBlocks--;
|
||||||
|
|
||||||
/* Free the normal heap */
|
/* Free the normal heap */
|
||||||
RtlFreeHeap (NormalHeap, 0, BlockInfo);
|
RtlFreeHeap(NormalHeap, 0, BlockInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move to the next one */
|
/* Move to the next one */
|
||||||
|
@ -1613,6 +1613,7 @@ PVOID NTAPI
|
||||||
RtlpPageHeapDestroy(HANDLE HeapPtr)
|
RtlpPageHeapDestroy(HANDLE HeapPtr)
|
||||||
{
|
{
|
||||||
PDPH_HEAP_ROOT DphRoot;
|
PDPH_HEAP_ROOT DphRoot;
|
||||||
|
PVOID Ptr;
|
||||||
PDPH_HEAP_BLOCK Node, Next;
|
PDPH_HEAP_BLOCK Node, Next;
|
||||||
PHEAP NormalHeap;
|
PHEAP NormalHeap;
|
||||||
ULONG Value;
|
ULONG Value;
|
||||||
|
@ -1637,10 +1638,11 @@ RtlpPageHeapDestroy(HANDLE HeapPtr)
|
||||||
RtlpDphFreeDelayedBlocksFromHeap(DphRoot, NormalHeap);
|
RtlpDphFreeDelayedBlocksFromHeap(DphRoot, NormalHeap);
|
||||||
|
|
||||||
/* Go through the busy blocks */
|
/* Go through the busy blocks */
|
||||||
Node = RtlEnumerateGenericTableAvl(&DphRoot->BusyNodesTable, TRUE);
|
Ptr = RtlEnumerateGenericTableAvl(&DphRoot->BusyNodesTable, TRUE);
|
||||||
|
|
||||||
while (Node)
|
while (Ptr)
|
||||||
{
|
{
|
||||||
|
Node = CONTAINING_RECORD(Ptr, DPH_HEAP_BLOCK, pUserAllocation);
|
||||||
if (!(DphRoot->ExtraFlags & DPH_EXTRA_CHECK_UNDERRUN))
|
if (!(DphRoot->ExtraFlags & DPH_EXTRA_CHECK_UNDERRUN))
|
||||||
{
|
{
|
||||||
if (!RtlpDphIsPageHeapBlock(DphRoot, Node->pUserAllocation, &Value, TRUE))
|
if (!RtlpDphIsPageHeapBlock(DphRoot, Node->pUserAllocation, &Value, TRUE))
|
||||||
|
@ -1653,7 +1655,7 @@ RtlpPageHeapDestroy(HANDLE HeapPtr)
|
||||||
//AVrfInternalHeapFreeNotification();
|
//AVrfInternalHeapFreeNotification();
|
||||||
|
|
||||||
/* Go to the next node */
|
/* Go to the next node */
|
||||||
Node = RtlEnumerateGenericTableAvl(&DphRoot->BusyNodesTable, FALSE);
|
Ptr = RtlEnumerateGenericTableAvl(&DphRoot->BusyNodesTable, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Acquire the global heap list lock */
|
/* Acquire the global heap list lock */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue