Author: cwittich
Date: Thu Dec 6 10:11:20 2007
New Revision: 31037
URL:
http://svn.reactos.org/svn/reactos?rev=31037&view=rev
Log:
really fix the bug now - count from CM_KCBS_PER_PAGE -1 to 0 instead of CM_KCBS_PER_PAGE
-1 to 1
Modified:
trunk/reactos/ntoskrnl/config/cmalloc.c
Modified: trunk/reactos/ntoskrnl/config/cmalloc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmalloc.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmalloc.c (original)
+++ trunk/reactos/ntoskrnl/config/cmalloc.c Thu Dec 6 10:11:20 2007
@@ -88,12 +88,12 @@
if (++AllocPage->FreeCount == CM_KCBS_PER_PAGE)
{
/* Loop all the entries */
- for (i = CM_KCBS_PER_PAGE - 1; i; i--)
+ for (i = CM_KCBS_PER_PAGE; i; i--)
{
/* Get the KCB */
Kcb = (PVOID)((ULONG_PTR)AllocPage +
FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage) +
- i * sizeof(CM_KEY_CONTROL_BLOCK));
+ (i - 1) * sizeof(CM_KEY_CONTROL_BLOCK));
/* Remove the entry */
RemoveEntryList(&Kcb->FreeListEntry);