From dd0b144c3ae83c2ea14f969cb58fa4b927c2c455 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 14 Jan 2022 15:03:22 +0100 Subject: [PATCH] BUG/MINOR: sink: Use the right field in appctx context in release callback In the release callback, ctx.peers was used instead of ctx.sft. Concretly, it is not an issue because the appctx context is an union and these both fields are structures with a unique pointer. But it will be a problem if that changes. This patch must be backported as far as 2.2. --- src/sink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sink.c b/src/sink.c index 9e4da9c1c..c1da18c8d 100644 --- a/src/sink.c +++ b/src/sink.c @@ -603,7 +603,7 @@ void __sink_forward_session_deinit(struct sink_forward_target *sft) static void sink_forward_session_release(struct appctx *appctx) { - struct sink_forward_target *sft = appctx->ctx.peers.ptr; + struct sink_forward_target *sft = appctx->ctx.sft.ptr; if (!sft) return;