From e1ce5dc491bb7fe283bfdf3b87930383ef0c5958 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 7 Jun 2017 16:36:42 +0800 Subject: [PATCH] mem: Move LWIP_DEBUGF out of critical section in mem_malloc Signed-off-by: Axel Lin --- src/core/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/mem.c b/src/core/mem.c index 48bc1e7a..e6b2929c 100644 --- a/src/core/mem.c +++ b/src/core/mem.c @@ -732,10 +732,10 @@ mem_malloc_adjust_lfree: /* if we got interrupted by a mem_free, try again */ } while (local_mem_free_count != 0); #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; }