zephyr/subsys
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
..
bluetooth Bluetooth: Host: Add Periodic Advertising ADI support 2021-11-04 13:32:00 +01:00
canbus kconfig: canbus: experimental settings now uses select EXPERIMENTAL 2021-10-22 13:59:21 +02:00
console console: Kconfig: Remove EXPERIMENTAL marker 2021-10-22 09:46:22 -04:00
cpp ARC: MWDT: get rid of MWDT startup libs 2021-09-01 17:08:32 -04:00
debug kconfig: debug: experimental settings now uses select EXPERIMENTAL 2021-10-25 10:46:48 +02:00
demand_paging demand_paging: eviction/nru: fix incorrect dirty bit return val 2021-09-20 19:43:02 -04:00
dfu dfu: boot: Add implementation for multi-image swap type check 2021-08-26 09:13:13 -04:00
disk
emul i2c: emul: Add get_config function 2021-11-02 16:46:33 +01:00
fb
fs fs: allow to configure per-alloaction heap overhead 2021-10-29 06:09:43 -04:00
ipc ipc: ipc_service: Rework multi-instance backend. 2021-10-11 20:58:09 -04:00
jwt jwt: mbedTLS requires csprng 2021-10-07 14:02:40 -05:00
logging logging: rtt: Fix compilation error when multithreading disable 2021-10-19 23:06:20 -04:00
lorawan kconfig: lorawan: experimental settings now uses select EXPERIMENTAL 2021-10-25 10:46:48 +02:00
mgmt mgmt: mcumgr: Make SMP service notification function public 2021-11-03 16:36:17 -04:00
modbus modbus: copy trans_id & proto_id to response header 2021-08-26 06:56:25 -04:00
net net/context: Close TCP connection properly 2021-11-04 13:54:28 +01:00
pm pm: device: runtime: use pm_device_runtime* namespace 2021-11-03 16:37:33 -04:00
portability cmsis_rtos_v1: fix thread instances management. 2021-09-09 12:01:06 -04:00
random random: Fix sys_csrand_get build condition 2021-10-07 14:02:40 -05:00
settings settings: Add name to backend choice in Kconfig 2021-11-03 16:35:46 -04:00
shell kconfig: shell: experimental settings now uses select EXPERIMENTAL 2021-10-25 10:46:48 +02:00
stats stats: fixed implicit integer sign extension in stats_get_off() 2021-10-28 15:15:56 -04:00
storage storage/flash_map: Separate layout and integrity functions 2021-10-21 17:18:44 -04:00
task_wdt task_wdt: ensure hw wdt is started before being fed 2021-10-21 07:35:11 -04:00
testsuite ztest: add a weak implementation of test_main() 2021-10-28 16:57:51 -04:00
timing
tracing tracing: fix PM system tracing 2021-11-03 16:37:33 -04:00
usb usb: function_rndis: do not force USB_COMPOSITE_DEVICE for IAD 2021-10-27 11:56:00 +02:00
CMakeLists.txt usb: remove Kconfig option CONFIG_USB 2021-08-03 19:00:12 -04:00
Kconfig