memp malloc: move LWIP_DEBUGF out of critical section (bug #51142)

This commit is contained in:
goldsimon 2017-05-30 11:39:42 +02:00
parent 84502e5ae0
commit ba1cf2fa44

View File

@ -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 */ /* cast through u8_t* to get rid of alignment warnings */
return ((u8_t*)memp + MEMP_SIZE); return ((u8_t*)memp + MEMP_SIZE);
} else { } else {
LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
#if MEMP_STATS #if MEMP_STATS
desc->stats->err++; desc->stats->err++;
#endif #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; return NULL;
} }