Skip to content

Commit f7809a2

Browse files
bkokoszxjajanusz
authored andcommitted
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>
1 parent f3d79e7 commit f7809a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void *alloc_cont_blocks(struct mm_heap *heap, int level,
268268
map->first_free += count;
269269

270270
/* update each block */
271-
for (current = start; current < count; current++) {
271+
for (current = start; current < start + count; current++) {
272272
hdr = &map->block[current];
273273
hdr->used = 1;
274274
}

0 commit comments

Comments
 (0)