zephyr/subsys/net
Marcin Niestroj 6521b9e4fa net: tcp: Fix net_buf leak in case of low available net_buf count
This net_buf leak happends when we are low on available net_buf
count. During TCP segment preparation we do allocate IP header
successfully, but we fail to allocate TCP header. In such case
pkt->frags is not NULL anymore (it contains IP header), but we
override it during TCP header allocation error path. This results
in net_buf containing IP header to never be deallocated, because
it does not belong to any net_pkt anymore.

Use net_pkt_frag_add() function to add tail for future net_pkt
deallocation, instead of assigning tail to pkt->frags pointer.

Fixes: c6407659f3 ("net: tcp: Add the frag back to caller allocated
  net_pkt")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2018-08-10 13:38:08 +03:00
..
ip net: tcp: Fix net_buf leak in case of low available net_buf count 2018-08-10 13:38:08 +03:00
l2 net: eth: Add start and stop L2 functions 2018-08-10 12:36:19 +03:00
lib net: lwm2m: no need to cleanup net_app_ctx in RD client 2018-08-07 19:55:49 +03:00
buf.c net: buf: add linearize, append_bytes and skip APIs to net_buf 2018-08-06 10:43:46 +03:00
CMakeLists.txt
hostname.c
Kconfig
Kconfig.hostname
TODO