1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-10 12:31:51 +00:00

Merge pull request #300 from shchmue/dev

heap: Prevent node chain collapse on free
This commit is contained in:
CTCaer 2019-10-25 20:31:38 +03:00 committed by GitHub
commit 58b57a7b14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
node->used = 1;
new->used = 0;
new->next = node->next;
new->next->prev = new;
new->prev = node;
node->next = new;

View file

@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
node->used = 1;
new->used = 0;
new->next = node->next;
new->next->prev = new;
new->prev = node;
node->next = new;