From ba1cf2fa44d3014e6e528eca9f75bfab2994f7e6 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 30 May 2017 11:39:42 +0200 Subject: [PATCH] memp malloc: move LWIP_DEBUGF out of critical section (bug #51142) --- src/core/memp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/memp.c b/src/core/memp.c index 515df2d6..799ed51b 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -339,13 +339,13 @@ do_memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int /* cast through u8_t* to get rid of alignment warnings */ return ((u8_t*)memp + MEMP_SIZE); } else { - LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); #if MEMP_STATS desc->stats->err++; #endif + SYS_ARCH_UNPROTECT(old_level); + LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } - SYS_ARCH_UNPROTECT(old_level); return NULL; }