BUG/MINOR: stktable: missing free in parse_stick_table()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 2 Nov 2023 08:18:55 +0000 (09:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Nov 2023 16:30:30 +0000 (17:30 +0100)
commit6376fe91427239c8650fba90166de8b0b396cf0b
tree7152427fefa0cea2fb883f06b6efc48f442d059f
parentb9c0b039c86228cb7fe29b610a775076fd25b1e8
BUG/MINOR: stktable: missing free in parse_stick_table()

When "peers" keyword is encountered within a stick table definition,
peers.name hint gets replaced with a new copy of the provided name using
strdup(). However, there is no detection on whether the name was
previously set or not, so it is currently allowed to reuse the keyword
multiple time to overwrite previous value, but here we forgot to free
previous value for peers.name before assigning it to a new one.

This should be backported to every stable versions.
src/stick_table.c