From: Willy Tarreau Date: Fri, 21 Oct 2016 15:13:24 +0000 (+0200) Subject: BUG/MINOR: vars: use sess and not s->sess in action_store() X-Git-Tag: v1.7-dev5~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=108a8fd8be0c78a4bf147a2028fd9bda3343c93c;p=thirdparty%2Fhaproxy.git BUG/MINOR: vars: use sess and not s->sess in action_store() This causes the stream to be dereferenced when not needed. It will cause trouble when variables are used outside of a stream. --- diff --git a/src/vars.c b/src/vars.c index 56fade5d9f..b22c3bf2ab 100644 --- a/src/vars.c +++ b/src/vars.c @@ -507,7 +507,7 @@ static enum act_return action_store(struct act_rule *rule, struct proxy *px, /* Process the expression. */ memset(&smp, 0, sizeof(smp)); - if (!sample_process(px, s->sess, s, dir|SMP_OPT_FINAL, + if (!sample_process(px, sess, s, dir|SMP_OPT_FINAL, rule->arg.vars.expr, &smp)) return ACT_RET_CONT;