mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-20 23:26:56 +08:00
Fix stats_display_memp() to avoid accessing NULLs
It's possible for pool pointers to be NULL. Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
committed by
Simon Goldschmidt
parent
13d7ac3363
commit
5d32779c1b
@@ -116,7 +116,11 @@ void
|
||||
stats_display_memp(struct stats_mem *mem, int idx)
|
||||
{
|
||||
if (idx < MEMP_MAX) {
|
||||
stats_display_mem(mem, mem->name);
|
||||
if (mem == NULL) {
|
||||
LWIP_PLATFORM_DIAG(("\nMEMP[%d]: NULL\n", idx));
|
||||
} else {
|
||||
stats_display_mem(mem, mem->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* MEMP_STATS */
|
||||
|
||||
Reference in New Issue
Block a user