Skip to content
Commit 3fd0a150 authored by Yuval Peress's avatar Yuval Peress Committed by Maureen Helm
Browse files

rtio: fix bug in mempool release API



It was previously assumed that the 'sys_mem_blocks' struct would maintain
information about contiguous blocks allocated so the release API only
took the starting address. This led to an issue where allocating 2+
blocks would end up with a memory leak because any block not being the
first would never be released.

Add the buffer length as an argument so the correct number of blocks can
be released. Also, ammend the tests to match and verify.

Signed-off-by: default avatarYuval Peress <peress@google.com>
parent c508ec75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment