BUG/MINOR: backend: Don't allow to change backend applet
This part was inherited from haproxy-1.5. But since a while (at least 1.8),
the backend applet, once created, is no longer changed. Thus there is no
reason to still check if the target has changed. And in fact, if it was
still possible, there would be a memory leak because the old applet would be
lost and never released.
There is no reason to backport this fix because the leak only exists on a
dead code path.
diff --git a/src/backend.c b/src/backend.c
index 8255ffb..12f9a65 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -2129,7 +2129,7 @@
/* the applet directly goes to the EST state */
struct appctx *appctx = cs_appctx(s->csb);
- if (!appctx || appctx->applet != __objt_applet(s->target))
+ if (!appctx)
appctx = cs_applet_create(cs, objt_applet(s->target));
if (!appctx) {