consistency: use lwm2m_{malloc,free} in CoAP as well