Hello Pedro et al,
Christiaan Simons wrote:
Pedro Alves wrote:
Yep, that's right. Any change of getting it into cvs?
I'm not sure if this is 100% correct.
pbuf_free() does not guarantee the pbuf-chain is fully freed,
it may also lower some reference counters, or free the chain partially.
Sometimes multiple calls to pbuf_free in a loop maybe required.
Setting the pointer to NULL without checking the return value
of pbuf_free might actually result in a leak.
If the TCP code has only referenced this pbuf *exactly once* before,
then a pbuf_free() followed
by NULLing its referencing pointer is OK.
So, please check that this is the case.
(If some other referer stills holds a reference, of course the pbuf
still exists, but that's that referers problem now.)
I think therefore, the comment above the code needs fixing too.
I will fix this in CVS, and change the comment to reflect what the code
really does.
Thanks for the fix.
Regards,
Leon.
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users