zephyr/subsys/net
Tomasz Bursztyka 8a2e5b1648 net/context: Close TCP connection properly
Closing a connection, thus calling net_context_put() will not close a
TCP connection properly, and will leak tcp connection memory.

This is because: net_context_put calls net_context_unref which calls
net_tcp_unref which leads to unref tcp connection and thus sets
ctx->tcp to NULL. Back to net_context_put, that one finally calls
net_tcp_put: but that bails out directly since ctx->tcp is NULL.

Fixing it by inverting net_tcp_put() and net_context_unref() calls
within net_context_put().

Fixes #38598

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-04 13:54:28 +01:00
..
ip net/context: Close TCP connection properly 2021-11-04 13:54:28 +01:00
l2 net: openthread: add log_strdup to role text, fix doc gender issue 2021-11-01 21:47:43 -04:00
lib net: lwm2m: Add option to configure device service period 2021-11-04 07:30:29 -04:00
buf.c net_buf_slist_{put|get}: make SMP safe 2021-09-28 11:37:56 +02:00
CMakeLists.txt
hostname.c net: hostname: Update unique hostname on link address change 2021-01-13 17:50:32 +02:00
Kconfig Bluetooth: controller: ISO adaptation layer, Rx unframed 2021-04-14 18:17:09 +02:00
Kconfig.hostname net: hostname: Update unique hostname on link address change 2021-01-13 17:50:32 +02:00
Kconfig.template.log_config.default.net
Kconfig.template.log_config.net