From: Frédéric Lécaille Date: Sun, 17 Jan 2021 12:08:39 +0000 (+0100) Subject: BUG/MINOR: peers: Possible appctx pointer dereference. X-Git-Tag: v2.3.5~46 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=707a1f5a798bca46e92c5fa49b0673b97c546790;p=haproxy-2.3.git BUG/MINOR: peers: Possible appctx pointer dereference. This bug may occur when enabling peers traces. It is possible that peer->appctx is NULL when entering peer_session_release(). (cherry picked from commit 4b1a05fcf81b4343d29aeb86394d44f29d2116a4) Signed-off-by: Christopher Faulet --- diff --git a/src/peers.c b/src/peers.c index a530a33..a38fc3c 100644 --- a/src/peers.c +++ b/src/peers.c @@ -425,7 +425,7 @@ static void peers_trace(enum trace_level level, uint64_t mask, const struct peer *peer = a2; struct peers *peers = NULL; - if (peer) { + if (peer && peer->appctx) { struct stream_interface *si; si = peer->appctx->owner;