]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: connection: do not use conn->owner when the session is known
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Nov 2020 16:08:15 +0000 (17:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 21 Nov 2020 14:29:22 +0000 (15:29 +0100)
commit38b4d2eb22fec0f11af50f8a9977ccae0e7c66c6
tree85abd7d898b5947c7ddcba19a10dd298d3e81e03
parente51fab0a4aba977b111c9d0926d6adbaf62204a1
CLEANUP: connection: do not use conn->owner when the session is known

At a few places we used to rely on conn->owner to retrieve the session
while the session is already known. This is not correct because at some
of these points the reason the connection's owner was still the session
(instead of NULL) is a mistake. At one place a comparison is even made
between the session and conn->owner assuming it's valid without checking
if it's NULL. Let's clean this up to use the session all the time.

Note that this will be needed for a forthcoming fix and will have to be
backported.
include/haproxy/session.h
src/backend.c
src/connection.c