kernel: fix k_stack_alloc_init()
k_stack_alloc_init() was creating a buffer that was 4 times too small to support the requested number of entries, since each entry in a k_stack is a u32_t. Fixes: #15911 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
15baad9419
commit
be3d4232c2
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ s32_t z_impl_k_stack_alloc_init(struct k_stack *stack, u32_t num_entries)
|
|||
void *buffer;
|
||||
s32_t ret;
|
||||
|
||||
buffer = z_thread_malloc(num_entries);
|
||||
buffer = z_thread_malloc(num_entries * sizeof(u32_t));
|
||||
if (buffer != NULL) {
|
||||
k_stack_init(stack, buffer, num_entries);
|
||||
stack->flags = K_STACK_FLAG_ALLOC;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue