mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[DDK]
- Fix ExAllocateFromZone. I understand it's deprecated, but it having a broken implementation which can't work at all because the one who coded this function failed to understand basic algorithms of linked lists is nonsense. svn path=/trunk/; revision=59494
This commit is contained in:
parent
30d0129f75
commit
ee87f2a4f6
|
@ -3350,9 +3350,10 @@ static __inline PVOID
|
|||
ExAllocateFromZone(
|
||||
IN PZONE_HEADER Zone)
|
||||
{
|
||||
PVOID Result = (PVOID)Zone->FreeList.Next;
|
||||
if (Zone->FreeList.Next)
|
||||
Zone->FreeList.Next = Zone->FreeList.Next->Next;
|
||||
return (PVOID) Zone->FreeList.Next;
|
||||
return Result;
|
||||
}
|
||||
|
||||
static __inline PVOID
|
||||
|
|
|
@ -276,9 +276,10 @@ static __inline PVOID
|
|||
ExAllocateFromZone(
|
||||
IN PZONE_HEADER Zone)
|
||||
{
|
||||
PVOID Result = (PVOID)Zone->FreeList.Next;
|
||||
if (Zone->FreeList.Next)
|
||||
Zone->FreeList.Next = Zone->FreeList.Next->Next;
|
||||
return (PVOID) Zone->FreeList.Next;
|
||||
return Result;
|
||||
}
|
||||
|
||||
static __inline PVOID
|
||||
|
|
Loading…
Reference in a new issue