This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 28749b8797f33a6ca3965c81307896b9d7a8af70 Author: zhanxiaoqi <[email protected]> AuthorDate: Wed Feb 25 21:40:24 2026 +0800 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 <[email protected]> --- mm/mempool/mempool_multiple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/mempool/mempool_multiple.c b/mm/mempool/mempool_multiple.c index 6859518601c..92ec9a1e9e9 100644 --- a/mm/mempool/mempool_multiple.c +++ b/mm/mempool/mempool_multiple.c @@ -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)
