You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/10/16 07:55:24 UTC

[GitHub] [mynewt-core] ncasaril opened a new pull request #2042: LWIP-UDP: pbuf_free on p as udp_sendto doesn't consume it

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:
users@infra.apache.org


With regards,
Apache Git Services