From: Christopher Faulet Date: Thu, 30 Jul 2020 08:40:58 +0000 (+0200) Subject: BUG/MINOR: lua: Fix a possible null pointer deref on lua ctx X-Git-Tag: v2.3-dev2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2361fd9487982225e816d61f8388447068540f8a;p=thirdparty%2Fhaproxy.git BUG/MINOR: lua: Fix a possible null pointer deref on lua ctx This bug was introduced by the commit 8f587ea3 ("MEDIUM: lua: Set the analyse expiration date with smaller wake_time only"). At the end of hlua_action(), the lua context may be null if the alloc failed. No backport needed, this is 2.3-dev. --- diff --git a/src/hlua.c b/src/hlua.c index a3726ca2ff..844a5ec9da 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -6706,7 +6706,7 @@ static enum act_return hlua_action(struct act_rule *rule, struct proxy *px, } end: - if (act_ret != ACT_RET_YIELD) + if (act_ret != ACT_RET_YIELD && s->hlua) s->hlua->wake_time = TICK_ETERNITY; return act_ret; }