]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: free logformat expr on compile failure in cfg_parse_log_profile
authorWilly Tarreau <w@1wt.eu>
Fri, 22 May 2026 08:49:17 +0000 (08:49 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 May 2026 08:52:42 +0000 (10:52 +0200)
commit340cc86efb2e792da157bde2499ee09932acebe2
tree778c5199b807e52faf04d35394fe9c8f9d09f2bc
parentf62d020140782ecdad79caa0b2e4163b54ca2163
BUG/MINOR: log: free logformat expr on compile failure in cfg_parse_log_profile

When lf_expr_compile() fails in cfg_parse_log_profile, the code leaves
without freeing the previously strdup()'d strings in target_lf->str and
target_lf->conf.file. Let's add a call to lf_expr_deinit() there to
release it.

It was harmless anyway since the startup will abort when this happens,
but better clean it because with increasingly dynamic setups, one day
it could become a runtime leak.

No backport is needed.
src/log.c