BUG/MEDIUM: stick-tables: Don't let table_process_entry() handle refcnt
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 11 Sep 2025 16:22:34 +0000 (18:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 14:48:35 +0000 (16:48 +0200)
commitcfad741b5847ade1abf9e5fbacbaec27e4622605
tree0f28d49ff1fbc4dee9f7673d6e58b2e6d96d1eca
parent10c4edd89f0c80b25eecb0d1ee8cf3cab7212be0
BUG/MEDIUM: stick-tables: Don't let table_process_entry() handle refcnt

Instead of having table_process_entry() decrement the session's ref
counter, do it outside, from the caller. Some were missed, such as when
an action was invalid, which would lead to the ref counter not being
decremented, and the session not being destroyable.
It makes more sense to do that from the caller, who just obtained the
ref counter, anyway.
This should be backporter up to 2.8.

(cherry picked from commit 71199e394c5e63fda7070cd7ae5b4b691411259d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1b2a06b994c0d537ca2da0af101c2b84735d67f9)
[cf: ctx adjt]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e9c299c31d67bebe68c22503a98b51da485cdca7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stick_table.c