From b6d04d1ac0b52f19aea8b5efe10bbe921dbc60d2 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 22 Feb 2023 10:55:10 -0500 Subject: [PATCH] [BugFix] chunk_alloc pass NULL to buflib_shrink old_chunk has already been unpinned therefore the address could be incorrect NULL will ensure buflib_shrink uses the same start address Change-Id: I9371e4f8263c6e5bf769108a8558dc938d4c8b87 --- firmware/chunk_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/chunk_alloc.c b/firmware/chunk_alloc.c index fd2eb2a772..02cc7a056c 100644 --- a/firmware/chunk_alloc.c +++ b/firmware/chunk_alloc.c @@ -114,7 +114,7 @@ bool chunk_realloc(struct chunk_alloc_header *hdr, logf("%s shrink existing chunk array", __func__); min_chunk = max_chunks; buflib_shrink(ctx, hdr->chunk_handle, - old_chunk, CHUNK_ARRSZ(max_chunks)); + NULL, CHUNK_ARRSZ(max_chunks)); new_handle = hdr->chunk_handle; }