diff --git a/src/core/pbuf.c b/src/core/pbuf.c index ead20bee..75fcf0af 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -642,6 +642,9 @@ pbuf_chain(struct pbuf *h, struct pbuf *t) LWIP_ASSERT("h != NULL", h != NULL); LWIP_ASSERT("t != NULL", t != NULL); + + if(t == NULL) + return; /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) {