mirror of https://github.com/thesofproject/sof.git
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:
parent
f3d79e7398
commit
f7809a2ee3
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue