]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: counters: fix stick-table entry leak when using track-sc2 in connection
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Jan 2014 21:48:24 +0000 (22:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Jan 2014 22:32:50 +0000 (23:32 +0100)
commite9101695ef354d5e3e17e8e65d224f380aa841e5
treec46a41d3ee99f57a04949e131ecbeaba15847f2e
parentf3338349ec387b9dc3538f095009bbfc761f461b
BUG/MEDIUM: counters: fix stick-table entry leak when using track-sc2 in connection

In 1.5-dev19, commit e25c917 ("MEDIUM: counters: add support for tracking
a third counter") introduced the third track counter. However, there was
a hard-coded test in the accept() error path to release only sc0 and sc1.
So it seems that if tracking sc2 at the connection level and deciding to
reject once the track-sc2 has been done, there could be some leaking of
stick-table entries which remain marked used forever, thus which can never
be purged nor expired. There's no memory leak though, it's just that
entries are unexpirable forever.

The simple solution consists in removing the test and always calling
the inline function which iterates over all entries.
src/session.c