-----Original Message-----
From: Pedro Alves [mailto:address@hidden
Sent: 6. april 2006 13:48
To: address@hidden
Subject: SPAM? [lwip-users] fix assert triggered in tcp_in.c
Hi all,
I was getting a few assertions in pbuf_free call about the ref count
being 0.
The following (hand made) patch fixed it.
In tcp_in.c around where it says:
/* We deallocate the incoming pbuf. If it was buffered by the
application, the application should have called pbuf_ref() to
increase the reference counter in the pbuf. If so, the buffer
isn't actually deallocated by the call to pbuf_free(), only the
reference count is decreased. */
- if (inseg.p != NULL) pbuf_free(inseg.p);
+ if (inseg.p != NULL) {
+ pbuf_free(inseg.p);
+ inseg.p = NULL;
+ }
I have been testing it for a few days, and found no problem.
Cheers,
Pedro Alves
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users