diff --git a/sys/net/sixlowpan/lowpan.c b/sys/net/sixlowpan/lowpan.c index 5716645103..a54d567101 100644 --- a/sys/net/sixlowpan/lowpan.c +++ b/sys/net/sixlowpan/lowpan.c @@ -780,15 +780,14 @@ void lowpan_read(uint8_t *data, uint8_t length, ieee_802154_long_t *s_laddr, else { lowpan_reas_buf_t *current_buf = get_packet_frag_buf(length, 0, s_laddr, d_laddr); - if(current_buf != NULL) - { + if (current_buf && current_buf->packet) { /* Copy packet bytes into corresponding packet space area */ memcpy(current_buf->packet, data, length); current_buf->current_packet_size += length; add_fifo_packet(current_buf); - }else - { - printf("ERROR: no memory left in packet buffer!\n"); + } + else { + DEBUG("ERROR: no memory left in packet buffer!\n"); } if (thread_getstatus(transfer_pid) == STATUS_SLEEPING) { thread_wakeup(transfer_pid);