mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
mm: Terminate the backtrace array with one NULL pointer
since one entry is enough to identify the end of back trace Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -111,9 +111,9 @@ static inline void mempool_add_backtrace(FAR struct mempool_s *pool,
|
||||
if (pool->procfs.backtrace)
|
||||
{
|
||||
int result = backtrace(buf->backtrace, CONFIG_MM_BACKTRACE);
|
||||
while (result < CONFIG_MM_BACKTRACE)
|
||||
if (result < CONFIG_MM_BACKTRACE)
|
||||
{
|
||||
buf->backtrace[result++] = NULL;
|
||||
buf->backtrace[result] = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user