On Thu, 2010-04-15 at 11:07 +0200, Daniel Berenguer wrote:
> memcpy(myBuf, p->payload, p->len);
> bufLen += p->len;
>
> // Commenting this block avoids the problem
> while((p->len != p->tot_len) && (p->next != NULL))
> {
> p = p->next;
> memcpy(myBuf+bufLen , p->payload, p->len);
> bufLen += p->len;
> }
>
> myBuf[bufLen] = 0;
> pbuf_free(p);
I think you need to call pbuf_free() on the first pbuf in the chain, not
just the last one.
Kieran
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users