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:
zhanxiaoqi 2026-02-25 21:40:24 +08:00 committed by Xiang Xiao
parent dfb2c24d62
commit 28749b8797

View file

@ -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)