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.

(cherry picked from commit 6376fe91427239c8650fba90166de8b0b396cf0b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0509b1e0a2b4c7b0150f592b80911219ce3d0ab9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 69f199474d4546f792e98abe098b36fbf3f95820)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9d7582c043be17396fe88cc1da0f9bb04222265c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed