Add mbuf_append result check

PUBLISHED_FROM=967a7ff3684e548ddbfe92365f7718a99e14d098
This commit is contained in:
ruslanvaliullin authored and Cesanta Bot committed 2017-06-07 18:50:24 +00:00
1 parent 023b55f2e5
commit a2192ae483
1 file changed
+1 -1
+1 -1
View File
@@ -11618,7 +11618,7 @@ uint32_t mg_coap_compose(struct mg_coap_message *cm, struct mbuf *io) {
/* saving previous lenght to handle non-empty mbuf */
prev_io_len = io->len;
mbuf_append(io, NULL, packet_size);
if (mbuf_append(io, NULL, packet_size) == 0) return MG_COAP_ERROR;
ptr = io->buf + prev_io_len;
/*