mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 13:21:29 +02:00
BUG/MINOR: log: fix leak in add_sample_to_logformat_list() error path
If add_sample_to_logformat_list() fails to allocate new logformat_node, then we directly jump to error_free label to cleanup the node using free_logformat_node() before returning an error. However if the node failed to allocate, then the sample expression that was allocated just before (not yet assigned) isn't released (free_logformat_node() is a no-op when NULL is provided). Thus if expr wasn't assigned to the node during early failure, then it must be manually released. This bug was introduced by 2462e5bcc ("BUG/MINOR: log: fix potential lf->name memory leak") which wasn't marked for backports. It only affects 3.0.
This commit is contained in:
parent
cbe78c0281
commit
9d4a44e713
Loading…
x
Reference in New Issue
Block a user