Rainer Gerhards
e0dc6d52a4
ratelimit: free dropped TCP messages on helper errors
...
Why
The previous change kept TCP batch processing alive on ratelimit helper
errors, but it left message ownership with the caller in those error
paths. Continuing without cleanup leaks the message object.
Impact
Unexpected ratelimit helper errors now drop and free the current message
before processing continues.
Before/After
Before, non-discard helper errors could leak `pMsg` in imptcp and the
generic TCP session path. After, both paths destroy the unqueued message
before returning success to the caller.
Technical Overview
`ratelimitAddMsg()` and `ratelimitAddMsgPerSource()` only take ownership
of a message when they enqueue or explicitly discard it internally.
When they return an unexpected error, ownership remains with the caller.
Add `msgDestruct(&pMsg)` in the non-discard error branch for `imptcp`
and `tcps_sess`, and update the debug text to reflect that the message is
being dropped before batch processing continues.
This preserves the non-fatal caller behavior while closing the memory
leak identified by gemini-code-assist and cubic.
With the help of AI-Agents: Codex
2026-04-13 08:10:39 +02:00
..
2025-07-16 13:56:21 +02:00
2026-03-27 14:24:10 +01:00
2026-01-29 17:17:38 +01:00
2025-07-16 13:56:21 +02:00
2025-09-03 12:29:19 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-04 16:50:11 +01:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-18 13:04:27 +01:00
2025-07-16 13:56:21 +02:00
2026-02-18 17:19:44 +01:00
2026-01-20 10:56:28 +01:00
2025-09-13 10:27:30 +02:00
2025-12-05 18:57:43 +01:00
2025-10-30 12:17:03 +05:30
2025-09-10 14:42:48 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2024-08-14 07:56:29 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-12-25 17:58:37 +01:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-07 11:32:00 +01:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-01-06 13:22:17 +01:00
2026-02-07 11:32:00 +01:00
2026-02-03 13:18:37 +01:00
2025-07-16 13:56:21 +02:00
2026-04-03 10:31:18 +02:00
2026-03-16 23:40:43 -07:00
2026-03-16 23:40:43 -07:00
2026-01-01 12:04:29 +01:00
2026-02-07 11:32:00 +01:00
2026-01-17 13:14:00 +01:00
2026-03-11 15:10:24 +01:00
2026-02-07 11:32:00 +01:00
2026-02-18 13:04:27 +01:00
2025-09-12 08:48:31 -07:00
2025-09-12 08:48:31 -07:00
2025-09-12 08:48:31 -07:00
2026-01-19 11:14:09 +01:00
2026-02-07 11:32:00 +01:00
2026-01-19 11:14:09 +01:00
2026-02-07 11:32:00 +01:00
2026-03-24 13:39:28 +01:00
2026-03-24 13:39:28 +01:00
2026-02-07 11:32:00 +01:00
2026-02-07 11:32:00 +01:00
2026-02-07 11:32:00 +01:00
2026-02-07 11:32:00 +01:00
2026-02-18 13:04:27 +01:00
2026-02-07 11:32:00 +01:00
2026-01-19 11:14:09 +01:00
2026-02-07 11:32:00 +01:00
2026-01-31 18:30:51 +01:00
2025-08-01 13:02:10 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-07 11:32:00 +01:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-07 11:32:00 +01:00
2026-03-16 23:40:43 -07:00
2026-02-23 10:17:04 +01:00
2026-04-08 08:45:24 +02:00
2026-04-08 08:45:24 +02:00
2026-01-30 12:20:21 +01:00
2025-07-16 13:56:21 +02:00
2026-04-12 13:12:54 +02:00
2026-02-07 11:32:00 +01:00
2025-10-30 12:17:03 +05:30
2026-03-11 15:10:24 +01:00
2025-12-05 16:44:11 +01:00
2026-02-07 11:32:00 +01:00
2025-07-16 13:56:21 +02:00
2026-04-09 19:27:09 +02:00
2026-01-28 14:02:39 +01:00
2026-02-06 16:02:08 +01:00
2026-02-18 17:19:44 +01:00
2026-01-31 18:30:51 +01:00
2026-02-07 11:32:00 +01:00
2026-02-07 11:32:00 +01:00
2026-02-07 11:32:00 +01:00
2026-04-04 14:01:39 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-04-09 19:27:09 +02:00
2026-02-07 11:32:00 +01:00
2026-04-13 08:10:39 +02:00
2026-02-07 11:32:00 +01:00
2026-04-09 19:27:09 +02:00
2026-03-16 23:40:43 -07:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-04-03 17:24:16 +02:00
2026-04-02 19:36:34 +02:00
2026-03-16 23:40:43 -07:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2025-07-16 13:56:21 +02:00
2026-02-07 11:32:00 +01:00
2026-03-16 23:40:43 -07:00
2026-01-06 11:34:36 +01:00
2026-03-16 23:40:43 -07:00
2025-08-19 16:06:44 +02:00
2026-04-02 19:36:34 +02:00
2026-03-26 09:19:48 +01:00
2026-03-16 23:40:43 -07:00
2025-07-16 13:56:21 +02:00
2026-01-30 12:20:21 +01:00
2025-07-16 13:56:21 +02:00