]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: arg: Fix leaks during arguments validation for fetches/converters
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Aug 2020 21:07:07 +0000 (23:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 7 Aug 2020 12:25:21 +0000 (14:25 +0200)
commit959171376f4974b883b2aa4228b3f8c610ca2ae9
tree83fba0bbcf2ba8de1a454cdc615749b2cb8b6f30
parent73292e9e660b98467ed48266d25684fa1e0bcebd
BUG/MINOR: arg: Fix leaks during arguments validation for fetches/converters

Some sample fetches or sample converters uses a validation functions for their
arguments. In these function, string arguments (ARGT_STR) may be converted to
another type (for instance a regex, a variable or a integer). Because these
strings are allocated when the argument list is built, they must be freed after
a conversion. Most of time, it is done. But not always. This patch fixes these
minor memory leaks (only on few strings, during the configuration parsing).

This patch may be backported to all supported versions, most probably as far as
2.1 only. If this commit is backported, the previous one 73292e9e6 ("BUG/MINOR:
lua: Duplicate map name to load it when a new Map object is created") must also
be backported. Note that some validation functions does not exists on old
version. It should be easy to resolve conflicts.
src/map.c
src/payload.c
src/sample.c