alloc: fix blocks update in alloc_cont_blocks()

Add proper stop condition during block hdr update
in alloc_cont_blocks() function.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
Bartosz Kokoszko 2019-07-25 16:02:59 +02:00 committed by Janusz Jankowski
parent f3d79e7398
commit f7809a2ee3
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ static void *alloc_cont_blocks(struct mm_heap *heap, int level,
map->first_free += count; map->first_free += count;
/* update each block */ /* update each block */
for (current = start; current < count; current++) { for (current = start; current < start + count; current++) {
hdr = &map->block[current]; hdr = &map->block[current];
hdr->used = 1; hdr->used = 1;
} }