]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua_fcn/queue: fix reference leak
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 10 May 2023 17:47:08 +0000 (19:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 May 2023 07:23:14 +0000 (09:23 +0200)
commitc0af7cdba26ab20f77c96e0cf5360141558a5744
tree7e6f2fdee82b98aba6d2b22a86e09ad3ad5379cb
parentbd8a94a7594c746b717fde686ea4e3fbdf41f4e9
BUG/MINOR: hlua_fcn/queue: fix reference leak

When pushing a lua object through lua Queue class, a new reference is
created from the object so that it can be safely restored when needed.

Likewise, when popping an object from lua Queue class, the object is
restored at the top of the stack via its reference id.

However, once the object is restored the related queue entry is removed,
thus the object reference must be dropped to prevent reference leak.
src/hlua_fcn.c