ncasaril opened a new pull request #2042: LWIP-UDP: pbuf_free on p as 
udp_sendto doesn't consume it
URL: https://github.com/apache/mynewt-core/pull/2042
 
 
   udp_sendto doesn't free the pbuf even though it succeeds in sending it as 
per comment at /net/ip/lwip_base/src/core/udp.c:854 causing a memory-leak and 
eventually you can't send udp-packets anymore as pbuf_alloc fails. 
   
   Hence, lwip_sendto will need to free it both for successful and failed 
sends. 
   
   The pbuf_free(p) should possibly happen before the check of rc even, 
removing the need to have it twice in the code. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to