diff --git a/coap_list.c b/coap_list.c index 4a10788f..e93003c5 100644 --- a/coap_list.c +++ b/coap_list.c @@ -6,9 +6,12 @@ * README for terms of use. */ +#include "config.h" + #include #include +#include "debug.h" #include "mem.h" #include "coap_list.h" @@ -71,7 +74,9 @@ coap_list_t * coap_new_listnode(void *data, void (*delete_func)(void *) ) { coap_list_t *node = coap_malloc( sizeof(coap_list_t) ); if ( ! node ) { - perror ("coap_new_listnode: malloc"); +#ifndef NDEBUG + coap_log(LOG_CRIT, "coap_new_listnode: malloc\n"); +#endif return NULL; }