diff --git a/examples/rest-example/coap-client-example.c b/examples/rest-example/coap-client-example.c index 946f3fcad..b88b0ca2a 100644 --- a/examples/rest-example/coap-client-example.c +++ b/examples/rest-example/coap-client-example.c @@ -80,8 +80,8 @@ handle_incoming_data() if (init_buffer(COAP_DATA_BUFF_SIZE)) { if (uip_newdata()) { coap_packet_t* response = (coap_packet_t*)allocate_buffer(sizeof(coap_packet_t)); - parse_message(response, uip_appdata, uip_datalen()); if (response) { + parse_message(response, uip_appdata, uip_datalen()); response_handler(response); } }