From 46819fb8ac7e8d6b846ceb4a4061c8b7bef69b40 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 8 Oct 2010 20:17:39 +0000 Subject: [PATCH] [HEAP] - Roel Messiant: Fix infinite loop in RtlDestroyHeap if heap contained big blocks. svn path=/trunk/; revision=49058 --- reactos/lib/rtl/heap_rewrite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/lib/rtl/heap_rewrite.c b/reactos/lib/rtl/heap_rewrite.c index 2075f076c27..dbe7785314a 100644 --- a/reactos/lib/rtl/heap_rewrite.c +++ b/reactos/lib/rtl/heap_rewrite.c @@ -1928,6 +1928,7 @@ RtlDestroyHeap(HANDLE HeapPtr) /* [in] Handle of heap */ { VirtualEntry = CONTAINING_RECORD(Current, HEAP_VIRTUAL_ALLOC_ENTRY, Entry); BaseAddress = (PVOID)VirtualEntry; + Current = Current->Flink; Size = 0; ZwFreeVirtualMemory(NtCurrentProcess(), &BaseAddress,