]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-tables: Decrement ref_cnt in table_* converters
authorDaniel Corbett <dcorbett@haproxy.com>
Sun, 27 May 2018 13:47:12 +0000 (09:47 -0400)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 May 2018 08:36:20 +0000 (10:36 +0200)
commit3e60b11100cbc812b77029ca142b83ac7a314db1
tree2d2840395cf2a82c882618fbe0325fdb907fe46f
parent673867c357260d13a8a6fcd17a3d2eb77ba10e5c
BUG/MEDIUM: stick-tables: Decrement ref_cnt in table_* converters

When using table_* converters ref_cnt was incremented
and never decremented causing entries to not expire.

The root cause appears to be that stktable_lookup_key()
was called within all sample_conv_table_* functions which was
incrementing ref_cnt and not decrementing after completion.

Added stktable_release() to the end of each sample_conv_table_*
function and reworked the end logic to ensure that ref_cnt is
always decremented after use.

This should be backported to 1.8
src/stick_table.c