BUG/MINOR: hlua: fix reference leak in hlua_post_init_state()
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 20 Mar 2023 15:29:55 +0000 (16:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:17 +0000 (08:58 +0200)
commit16d047b615408e05e35f0a655962ff755d6924a4
treebac58d7550f5e88fe4a1c0c8c7b49bde9b1bff18
parentbe58d6683c2d46732ea21eb55c4353a4e0c257a3
BUG/MINOR: hlua: fix reference leak in hlua_post_init_state()

hlua init function references were not released during
hlua_post_init_state().

Hopefully, this function is only used during startup so the resulting
leak is not a big deal.
Since each init lua function runs precisely once, it is safe to release
the ref as soon as the function is restored on the stack.

This could be backported to every stable versions.
Please note that this commit depends on "MINOR: hlua: add simple hlua reference handling API"
src/hlua.c