mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
mm/mempool: Optimize undefined behavior in memory pool allocation
The wait member variable of the memory pool structure is not initialized, leading to undefined behavior of the memory pool. Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
This commit is contained in:
parent
dfb2c24d62
commit
28749b8797
1 changed files with 1 additions and 0 deletions
|
|
@ -463,6 +463,7 @@ mempool_multiple_init(FAR const char *name,
|
|||
pools[i].alloc = mempool_multiple_alloc_callback;
|
||||
pools[i].free = mempool_multiple_free_callback;
|
||||
pools[i].check = mempool_multiple_check;
|
||||
pools[i].wait = false;
|
||||
|
||||
ret = mempool_init(pools + i, name);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue